diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-18 13:37:23 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-18 13:37:23 +0200 |
commit | 480fe2f859b191584113de6e483121d3893eaf3e (patch) | |
tree | 84c74f42b348ec8c6d6a81d7cca57e3c939cb6c8 /src/ui/sidebarwidget.c | |
parent | fa174461abdc5c33de16428109c7d46b4f150093 (diff) |
Mobile improvements
Seeing if a few forced redraws will take care of the squished view issue.
On the phone, showing and hiding the sidebar is not supposed to resize any documents.
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r-- | src/ui/sidebarwidget.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index ac119575..8c1bb60d 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -699,8 +699,9 @@ static void checkModeButtonLayout_SidebarWidget_(iSidebarWidget *d) { | |||
699 | } | 699 | } |
700 | 700 | ||
701 | void setWidth_SidebarWidget(iSidebarWidget *d, int width) { | 701 | void setWidth_SidebarWidget(iSidebarWidget *d, int width) { |
702 | const iBool isFixedWidth = deviceType_App() == phone_AppDeviceType; | ||
702 | iWidget *w = as_Widget(d); | 703 | iWidget *w = as_Widget(d); |
703 | if (deviceType_App() != phone_AppDeviceType) { /* phone doesn't allow resizing */ | 704 | if (!isFixedWidth) { |
704 | /* Even less space if the other sidebar is visible, too. */ | 705 | /* Even less space if the other sidebar is visible, too. */ |
705 | const int otherWidth = | 706 | const int otherWidth = |
706 | width_Widget(findWidget_App(d->side == left_SideBarSide ? "sidebar2" : "sidebar")); | 707 | width_Widget(findWidget_App(d->side == left_SideBarSide ? "sidebar2" : "sidebar")); |
@@ -713,7 +714,7 @@ void setWidth_SidebarWidget(iSidebarWidget *d, int width) { | |||
713 | arrange_Widget(findWidget_App("stack")); | 714 | arrange_Widget(findWidget_App("stack")); |
714 | checkModeButtonLayout_SidebarWidget_(d); | 715 | checkModeButtonLayout_SidebarWidget_(d); |
715 | updateItemHeight_SidebarWidget_(d); | 716 | updateItemHeight_SidebarWidget_(d); |
716 | if (!isRefreshPending_App()) { | 717 | if (!isFixedWidth && !isRefreshPending_App()) { |
717 | updateSize_DocumentWidget(document_App()); | 718 | updateSize_DocumentWidget(document_App()); |
718 | invalidate_ListWidget(d->list); | 719 | invalidate_ListWidget(d->list); |
719 | } | 720 | } |