From 25c902d38c64e5ef8b10a11e1581788904b69f13 Mon Sep 17 00:00:00 2001
From: Janus <janus2@ymail.com>
Date: Tue, 10 Mar 2015 20:40:57 +0000
Subject: [PATCH] Fix 11898. [ShowImage] Move toolbar buttons near the screen
border in fullscreen mode
---
src/apps/showimage/ShowImageWindow.cpp | 12 ++++++++++++
src/apps/showimage/ShowImageWindow.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/src/apps/showimage/ShowImageWindow.cpp b/src/apps/showimage/ShowImageWindow.cpp
index ae7a9fa..3067828 100644
a
|
b
|
|
28 | 28 | #include <Button.h> |
29 | 29 | #include <Catalog.h> |
30 | 30 | #include <Clipboard.h> |
| 31 | #include <ControlLook.h> |
31 | 32 | #include <DurationFormat.h> |
32 | 33 | #include <Entry.h> |
33 | 34 | #include <File.h> |
… |
… |
ShowImageWindow::_ToggleFullScreen()
|
1286 | 1287 | |
1287 | 1288 | fToolBar->SetActionVisible(MSG_FULL_SCREEN, fFullScreen); |
1288 | 1289 | _SetToolBarVisible(!fFullScreen && fShowToolBar); |
| 1290 | _SetToolBarBorder(!fFullScreen); |
1289 | 1291 | |
1290 | 1292 | MoveTo(frame.left, frame.top); |
1291 | 1293 | ResizeTo(frame.Width(), frame.Height()); |
… |
… |
ShowImageWindow::_SetToolBarVisible(bool visible, bool animate)
|
1548 | 1550 | } |
1549 | 1551 | |
1550 | 1552 | |
| 1553 | void |
| 1554 | ShowImageWindow::_SetToolBarBorder(bool visible) |
| 1555 | { |
| 1556 | float inset = visible |
| 1557 | ? ceilf(be_control_look->DefaultItemSpacing() / 2) : 0; |
| 1558 | |
| 1559 | fToolBar->GroupLayout()->SetInsets(inset, 0, inset, 0); |
| 1560 | } |
| 1561 | |
| 1562 | |
1551 | 1563 | bool |
1552 | 1564 | ShowImageWindow::QuitRequested() |
1553 | 1565 | { |
diff --git a/src/apps/showimage/ShowImageWindow.h b/src/apps/showimage/ShowImageWindow.h
index ea593a3..83c0113 100644
a
|
b
|
private:
|
105 | 105 | |
106 | 106 | void _SetToolBarVisible(bool visible, |
107 | 107 | bool animate = false); |
| 108 | void _SetToolBarBorder(bool visible); |
108 | 109 | |
109 | 110 | private: |
110 | 111 | ImageFileNavigator fNavigator; |