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

Commit 81ecb88b authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

Merge branch '201-Add_padding_to_top_bar_icons' into 'master'

201-Add_padding_to_top_bar_icons

See merge request !32
parents 2234180d 438e7b5b
Loading
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -378,7 +378,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");
@@ -394,7 +394,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) {
@@ -409,7 +408,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);
@@ -418,7 +417,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 −2
Original line number Diff line number Diff line
@@ -5,8 +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>