Fix 11898. [ShowImage] Move toolbar buttons near the screen border in fullscreen mode
Signed-off-by: John Scipione <[email protected]>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <Button.h>
|
||||
#include <Catalog.h>
|
||||
#include <Clipboard.h>
|
||||
#include <ControlLook.h>
|
||||
#include <DurationFormat.h>
|
||||
#include <Entry.h>
|
||||
#include <File.h>
|
||||
@@ -1286,6 +1287,7 @@ ShowImageWindow::_ToggleFullScreen()
|
||||
|
||||
fToolBar->SetActionVisible(MSG_FULL_SCREEN, fFullScreen);
|
||||
_SetToolBarVisible(!fFullScreen && fShowToolBar);
|
||||
_SetToolBarBorder(!fFullScreen);
|
||||
|
||||
MoveTo(frame.left, frame.top);
|
||||
ResizeTo(frame.Width(), frame.Height());
|
||||
@@ -1548,6 +1550,16 @@ ShowImageWindow::_SetToolBarVisible(bool visible, bool animate)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ShowImageWindow::_SetToolBarBorder(bool visible)
|
||||
{
|
||||
float inset = visible
|
||||
? ceilf(be_control_look->DefaultItemSpacing() / 2) : 0;
|
||||
|
||||
fToolBar->GroupLayout()->SetInsets(inset, 0, inset, 0);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ShowImageWindow::QuitRequested()
|
||||
{
|
||||
|
||||
@@ -105,6 +105,7 @@ private:
|
||||
|
||||
void _SetToolBarVisible(bool visible,
|
||||
bool animate = false);
|
||||
void _SetToolBarBorder(bool visible);
|
||||
|
||||
private:
|
||||
ImageFileNavigator fNavigator;
|
||||
|
||||
Reference in New Issue
Block a user