diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-04 13:01:33 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-04 13:01:33 +0200 |
commit | 2963641491200a6d67edd51af3b986af35faa04b (patch) | |
tree | 119aee0b28345697019a30f2d891b31662b6b0bc /src | |
parent | d3fd40c8ef38ba5eeaeaa474166a66ca36f2edf7 (diff) |
Fixed UI glitches after sidebar changes
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/root.c | 5 | ||||
-rw-r--r-- | src/ui/sidebarwidget.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/root.c b/src/ui/root.c index 65fc11d1..0e949246 100644 --- a/src/ui/root.c +++ b/src/ui/root.c | |||
@@ -489,9 +489,10 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { | |||
489 | iSidebarWidget *sidebar = findChild_Widget(root, "sidebar"); | 489 | iSidebarWidget *sidebar = findChild_Widget(root, "sidebar"); |
490 | removeChild_Widget(parent_Widget(sidebar), sidebar); | 490 | removeChild_Widget(parent_Widget(sidebar), sidebar); |
491 | if (isLandscape_App()) { | 491 | if (isLandscape_App()) { |
492 | addChildPos_Widget(findChild_Widget(root, "tabs.content"), iClob(sidebar), front_WidgetAddPos); | 492 | setVisualOffset_Widget(as_Widget(sidebar), 0, 0, 0); |
493 | addChildPos_Widget(findChild_Widget(root, "tabs.content"), iClob(sidebar), front_WidgetAddPos); | ||
493 | setWidth_SidebarWidget(sidebar, 73.0f); | 494 | setWidth_SidebarWidget(sidebar, 73.0f); |
494 | setFlags_Widget(as_Widget(sidebar), fixedHeight_WidgetFlag, iFalse); | 495 | setFlags_Widget(as_Widget(sidebar), fixedHeight_WidgetFlag | fixedPosition_WidgetFlag, iFalse); |
495 | } | 496 | } |
496 | else { | 497 | else { |
497 | addChild_Widget(root, iClob(sidebar)); | 498 | addChild_Widget(root, iClob(sidebar)); |
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index b7e3b19a..62abd58f 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -1289,6 +1289,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1289 | checkModeButtonLayout_SidebarWidget_(d); | 1289 | checkModeButtonLayout_SidebarWidget_(d); |
1290 | if (deviceType_App() == phone_AppDeviceType) { // && d->side == left_SidebarSide) { | 1290 | if (deviceType_App() == phone_AppDeviceType) { // && d->side == left_SidebarSide) { |
1291 | // setFlags_Widget(w, rightEdgeDraggable_WidgetFlag, isPortrait_App()); | 1291 | // setFlags_Widget(w, rightEdgeDraggable_WidgetFlag, isPortrait_App()); |
1292 | setFlags_Widget(findChild_Widget(w, "sidebar.title"), hidden_WidgetFlag, isLandscape_App()); | ||
1292 | setFlags_Widget(findChild_Widget(w, "sidebar.close"), hidden_WidgetFlag, isLandscape_App()); | 1293 | setFlags_Widget(findChild_Widget(w, "sidebar.close"), hidden_WidgetFlag, isLandscape_App()); |
1293 | /* In landscape, visibility of the toolbar is controlled separately. */ | 1294 | /* In landscape, visibility of the toolbar is controlled separately. */ |
1294 | if (isVisible_Widget(w)) { | 1295 | if (isVisible_Widget(w)) { |