Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84d79223 authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽 Committed by Mohammed Althaf T
Browse files

201-Add_padding_to_top_bar_icons

parent ff90f386
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -505,7 +505,7 @@ public class MainUI {
					}*/
                    int total_button_size = count*button_size;
                    int margin = 0;
                    int topMargin = (int) ScaleUtils.convertDpToPx(main_activity, 24.0f);
                    int topMargin = (int) ScaleUtils.convertDpToPx(main_activity, 8.0f);
                    if( total_button_size > display_height ) {
                        if( MyDebug.LOG )
                            Log.d(TAG, "need to reduce button size");
@@ -522,7 +522,6 @@ public class MainUI {
                        Log.d(TAG, "total_button_size: " + total_button_size);
                        Log.d(TAG, "margin: " + margin);
                    }
                    int leftMargin = (int) ScaleUtils.convertDpToPx(main_activity, 16.0f);
                    for(View this_view : buttons_permanent) {
                        if( this_view.getVisibility() == View.VISIBLE ) {
                            if( MyDebug.LOG ) {
@@ -537,7 +536,7 @@ public class MainUI {
                            // is displayed (when taking a photo) if it is still shown left-most, rather than centred; also
                            // needed for "pause preview" trash/icons to be shown properly (test by rotating the phone to update
                            // the layout)
                            layoutParams.setMargins(leftMargin, this_view == first_visible_view ? topMargin : margin / 2, 0, this_view == last_visible_view ? topMargin : margin / 2);
                            layoutParams.setMargins(0, this_view == first_visible_view ? topMargin : margin / 2, 0, this_view == last_visible_view ? topMargin : margin / 2);
                            layoutParams.width = button_size;
                            layoutParams.height = button_size;
                            this_view.setLayoutParams(layoutParams);
@@ -546,7 +545,7 @@ public class MainUI {

                    view = main_activity.findViewById(R.id.top_bg);
                    layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams();
                    layoutParams.width = button_size + (2 * leftMargin);
                    layoutParams.width = button_size;
                    view.setLayoutParams(layoutParams);
                    top_icon = view;
                }
+2 −3
Original line number Diff line number Diff line
@@ -5,9 +5,8 @@
    <dimen name="activity_vertical_margin">16dp</dimen>

    <!-- used for the on-screen icons, e.g., Settings etc -->
    <dimen name="onscreen_button_size">24dp</dimen>

    <dimen name="onscreen_button_padding">0dp</dimen>
    <dimen name="onscreen_button_size">56dp</dimen>
    <dimen name="onscreen_button_padding">16dp</dimen>
    <dimen name="shutter_button_size">70dp</dimen>
    <dimen name="onscreen_bottom_button_size">36dp</dimen>
    <dimen name="onscreen_bottom_panorama_button_size">48dp</dimen>