Ticket #11898: 0001-Fix-11898.-ShowImage-Move-toolbar-buttons-near-the-s.patch

File 0001-Fix-11898.-ShowImage-Move-toolbar-buttons-near-the-s.patch, 1.8 KB (added by Janus, 9 years ago)
  • src/apps/showimage/ShowImageWindow.cpp

    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  
    2828#include <Button.h>
    2929#include <Catalog.h>
    3030#include <Clipboard.h>
     31#include <ControlLook.h>
    3132#include <DurationFormat.h>
    3233#include <Entry.h>
    3334#include <File.h>
    ShowImageWindow::_ToggleFullScreen()  
    12861287
    12871288    fToolBar->SetActionVisible(MSG_FULL_SCREEN, fFullScreen);
    12881289    _SetToolBarVisible(!fFullScreen && fShowToolBar);
     1290    _SetToolBarBorder(!fFullScreen);
    12891291
    12901292    MoveTo(frame.left, frame.top);
    12911293    ResizeTo(frame.Width(), frame.Height());
    ShowImageWindow::_SetToolBarVisible(bool visible, bool animate)  
    15481550}
    15491551
    15501552
     1553void
     1554ShowImageWindow::_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
    15511563bool
    15521564ShowImageWindow::QuitRequested()
    15531565{
  • src/apps/showimage/ShowImageWindow.h

    diff --git a/src/apps/showimage/ShowImageWindow.h b/src/apps/showimage/ShowImageWindow.h
    index ea593a3..83c0113 100644
    a b private:  
    105105
    106106            void                _SetToolBarVisible(bool visible,
    107107                                    bool animate = false);
     108            void                _SetToolBarBorder(bool visible);
    108109
    109110private:
    110111            ImageFileNavigator  fNavigator;