diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/documentwidget.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index e4dadeff..3c16df74 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1183,6 +1183,12 @@ static void smoothScroll_DocumentWidget_(iDocumentWidget *d, int offset, int dur | |||
1183 | setLinkNumberMode_DocumentWidget_(d, iFalse); | 1183 | setLinkNumberMode_DocumentWidget_(d, iFalse); |
1184 | invalidateVisibleLinks_DocumentWidget_(d); | 1184 | invalidateVisibleLinks_DocumentWidget_(d); |
1185 | } | 1185 | } |
1186 | /* Show and hide toolbar on scroll. */ | ||
1187 | if (deviceType_App() == phone_AppDeviceType) { | ||
1188 | if (prefs_App()->hideToolbarOnScroll && iAbs(offset) > 5) { | ||
1189 | showToolbars_Window(get_Window(), offset < 0); | ||
1190 | } | ||
1191 | } | ||
1186 | if (!prefs_App()->smoothScrolling) { | 1192 | if (!prefs_App()->smoothScrolling) { |
1187 | duration = 0; /* always instant */ | 1193 | duration = 0; /* always instant */ |
1188 | } | 1194 | } |
@@ -1193,14 +1199,6 @@ static void smoothScroll_DocumentWidget_(iDocumentWidget *d, int offset, int dur | |||
1193 | const int scrollMax = scrollMax_DocumentWidget_(d); | 1199 | const int scrollMax = scrollMax_DocumentWidget_(d); |
1194 | if (scrollMax > 0) { | 1200 | if (scrollMax > 0) { |
1195 | destY = iMin(destY, scrollMax); | 1201 | destY = iMin(destY, scrollMax); |
1196 | if (deviceType_App() == phone_AppDeviceType) { | ||
1197 | if (destY == scrollMax) { | ||
1198 | showToolbars_Window(get_Window(), iTrue); | ||
1199 | } | ||
1200 | else if (prefs_App()->hideToolbarOnScroll && iAbs(offset) > 5) { | ||
1201 | showToolbars_Window(get_Window(), offset < 0); | ||
1202 | } | ||
1203 | } | ||
1204 | } | 1202 | } |
1205 | else { | 1203 | else { |
1206 | destY = 0; | 1204 | destY = 0; |