summaryrefslogtreecommitdiff
path: root/src/ui/sidebarwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r--src/ui/sidebarwidget.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 27646b22..2e1e138e 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -678,8 +678,8 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) {
678 iClob(buttons), 678 iClob(buttons),
679 arrangeHorizontal_WidgetFlag | 679 arrangeHorizontal_WidgetFlag |
680 resizeWidthOfChildren_WidgetFlag | 680 resizeWidthOfChildren_WidgetFlag |
681 arrangeHeight_WidgetFlag | resizeToParentWidth_WidgetFlag | 681 arrangeHeight_WidgetFlag | resizeToParentWidth_WidgetFlag); // |
682 drawBackgroundToHorizontalSafeArea_WidgetFlag); 682// drawBackgroundToHorizontalSafeArea_WidgetFlag);
683 setBackgroundColor_Widget(buttons, uiBackgroundSidebar_ColorId); 683 setBackgroundColor_Widget(buttons, uiBackgroundSidebar_ColorId);
684 } 684 }
685 else { 685 else {
@@ -700,13 +700,13 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) {
700 setPadding_Widget(as_Widget(d->list), 0, gap_UI, 0, gap_UI); 700 setPadding_Widget(as_Widget(d->list), 0, gap_UI, 0, gap_UI);
701 addChildFlags_Widget(listAndActions, 701 addChildFlags_Widget(listAndActions,
702 iClob(d->list), 702 iClob(d->list),
703 expand_WidgetFlag | drawBackgroundToHorizontalSafeArea_WidgetFlag); 703 expand_WidgetFlag); // | drawBackgroundToHorizontalSafeArea_WidgetFlag);
704 setId_Widget(addChildPosFlags_Widget(listAndActions, 704 setId_Widget(addChildPosFlags_Widget(listAndActions,
705 iClob(d->actions = new_Widget()), 705 iClob(d->actions = new_Widget()),
706 isPhone ? front_WidgetAddPos : back_WidgetAddPos, 706 isPhone ? front_WidgetAddPos : back_WidgetAddPos,
707 arrangeHorizontal_WidgetFlag | arrangeHeight_WidgetFlag | 707 arrangeHorizontal_WidgetFlag | arrangeHeight_WidgetFlag |
708 resizeWidthOfChildren_WidgetFlag | 708 resizeWidthOfChildren_WidgetFlag), // |
709 drawBackgroundToHorizontalSafeArea_WidgetFlag), 709// drawBackgroundToHorizontalSafeArea_WidgetFlag),
710 "actions"); 710 "actions");
711 setBackgroundColor_Widget(d->actions, uiBackgroundSidebar_ColorId); 711 setBackgroundColor_Widget(d->actions, uiBackgroundSidebar_ColorId);
712 d->contextItem = NULL; 712 d->contextItem = NULL;
@@ -938,7 +938,7 @@ static iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char *
938 } 938 }
939 const iBool isAnimated = prefs_App()->uiAnimations && 939 const iBool isAnimated = prefs_App()->uiAnimations &&
940 argLabel_Command(cmd, "noanim") == 0 && 940 argLabel_Command(cmd, "noanim") == 0 &&
941 (deviceType_App() != phone_AppDeviceType); 941 (d->side == left_SideBarSide || deviceType_App() != phone_AppDeviceType);
942 int visX = 0; 942 int visX = 0;
943 if (isVisible_Widget(w)) { 943 if (isVisible_Widget(w)) {
944 visX = left_Rect(bounds_Widget(w)) - left_Rect(w->root->widget->rect); 944 visX = left_Rect(bounds_Widget(w)) - left_Rect(w->root->widget->rect);
@@ -989,6 +989,15 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
989 if (isVisible_Widget(w)) { 989 if (isVisible_Widget(w)) {
990 postCommand_Widget(w, "sidebar.toggle"); 990 postCommand_Widget(w, "sidebar.toggle");
991 } 991 }
992 setFlags_Widget(findChild_Widget(w, "buttons"),
993 drawBackgroundToHorizontalSafeArea_WidgetFlag,
994 isLandscape_App());
995 setFlags_Widget(findChild_Widget(w, "actions"),
996 drawBackgroundToHorizontalSafeArea_WidgetFlag,
997 isLandscape_App());
998 setFlags_Widget(as_Widget(d->list),
999 drawBackgroundToHorizontalSafeArea_WidgetFlag,
1000 isLandscape_App());
992 return iFalse; 1001 return iFalse;
993 } 1002 }
994 } 1003 }
@@ -1528,9 +1537,11 @@ static void draw_SidebarWidget_(const iSidebarWidget *d) {
1528 const iRect bounds = bounds_Widget(w); 1537 const iRect bounds = bounds_Widget(w);
1529 iPaint p; 1538 iPaint p;
1530 init_Paint(&p); 1539 init_Paint(&p);
1531 if (flags_Widget(w) & visualOffset_WidgetFlag && 1540 if (deviceType_App() != phone_AppDeviceType) {
1532 flags_Widget(w) & horizontalOffset_WidgetFlag && isVisible_Widget(w)) { 1541 if (flags_Widget(w) & visualOffset_WidgetFlag &&
1533 fillRect_Paint(&p, boundsWithoutVisualOffset_Widget(w), tmBackground_ColorId); 1542 flags_Widget(w) & horizontalOffset_WidgetFlag && isVisible_Widget(w)) {
1543 fillRect_Paint(&p, boundsWithoutVisualOffset_Widget(w), tmBackground_ColorId);
1544 }
1534 } 1545 }
1535 draw_Widget(w); 1546 draw_Widget(w);
1536 if (isVisible_Widget(w)) { 1547 if (isVisible_Widget(w)) {