Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0071c788 authored by Albert Astals Cid's avatar Albert Astals Cid

Make 53 users happy by allowing to show or hide the bottom page bar

Based on a patch by kde2eran@tromer.org
BUGS: 157284
FIXED-IN: 4.6

svn path=/trunk/KDE/kdegraphics/okular/; revision=1191188
parent 20bb66e6
......@@ -190,6 +190,9 @@
<default>true</default>
</entry>
<entry key="SplitterSizes" type="IntList" />
<entry key="ShowBottomBar" type="Bool" >
<default>true</default>
</entry>
</group>
<group name="Nav Panel" >
<entry key="CurrentPageOnly" type="Bool" >
......
......@@ -369,18 +369,18 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
rightLayout->addWidget( m_pageView );
m_findBar = new FindBar( m_document, rightContainer );
rightLayout->addWidget( m_findBar );
QWidget * bottomBar = new QWidget( rightContainer );
QHBoxLayout * bottomBarLayout = new QHBoxLayout( bottomBar );
m_pageSizeLabel = new PageSizeLabel( bottomBar, m_document );
m_bottomBar = new QWidget( rightContainer );
QHBoxLayout * bottomBarLayout = new QHBoxLayout( m_bottomBar );
m_pageSizeLabel = new PageSizeLabel( m_bottomBar, m_document );
bottomBarLayout->setMargin( 0 );
bottomBarLayout->setSpacing( 0 );
bottomBarLayout->addWidget( m_pageSizeLabel->antiWidget() );
bottomBarLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
m_miniBar = new MiniBar( bottomBar, m_document );
m_miniBar = new MiniBar( m_bottomBar, m_document );
bottomBarLayout->addWidget( m_miniBar );
bottomBarLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
bottomBarLayout->addWidget( m_pageSizeLabel );
rightLayout->addWidget( bottomBar );
rightLayout->addWidget( m_bottomBar );
connect( m_reviewsWidget, SIGNAL( setAnnotationWindow( Okular::Annotation* ) ),
m_pageView, SLOT( setAnnotationWindow( Okular::Annotation* ) ) );
......@@ -519,6 +519,12 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
m_showLeftPanel->setChecked( Okular::Settings::showLeftPanel() );
slotShowLeftPanel();
m_showBottomBar = ac->add<KToggleAction>("show_bottombar");
m_showBottomBar->setText(i18n( "Show &Page Bar"));
connect( m_showBottomBar, SIGNAL( toggled( bool ) ), this, SLOT( slotShowBottomBar() ) );
m_showBottomBar->setChecked( Okular::Settings::showBottomBar() );
slotShowBottomBar();
QAction * importPS = ac->addAction("import_ps");
importPS->setText(i18n("&Import PostScript as PDF..."));
importPS->setIcon(KIcon("document-import"));
......@@ -648,6 +654,7 @@ Part::~Part()
delete m_pageView;
delete m_thumbnailList;
delete m_miniBar;
delete m_bottomBar;
#ifdef OKULAR_ENABLE_MINIBAR
delete m_progressWidget;
#endif
......@@ -1168,6 +1175,14 @@ void Part::slotShowLeftPanel()
m_sidebar->setSidebarVisibility( showLeft );
}
void Part::slotShowBottomBar()
{
const bool showBottom = m_showBottomBar->isChecked();
Okular::Settings::setShowBottomBar( showBottom );
Okular::Settings::self()->writeConfig();
// show/hide bottom bar
m_bottomBar->setVisible( showBottom );
}
void Part::slotFileDirty( const QString& path )
{
......
......@@ -151,6 +151,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
void slotShowProperties();
void slotShowEmbeddedFiles();
void slotShowLeftPanel();
void slotShowBottomBar();
void slotShowPresentation();
void slotHidePresentation();
void slotExportAs(QAction *);
......@@ -204,6 +205,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
QPointer<PageView> m_pageView;
QPointer<TOC> m_toc;
QPointer<MiniBar> m_miniBar;
QPointer<QWidget> m_bottomBar;
QPointer<PresentationWidget> m_presentationWidget;
QPointer<ProgressWidget> m_progressWidget;
QPointer<PageSizeLabel> m_pageSizeLabel;
......@@ -249,6 +251,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
KAction *m_showPresentation;
KToggleAction* m_showMenuBarAction;
KToggleAction* m_showLeftPanel;
KToggleAction* m_showBottomBar;
KToggleFullScreenAction* m_showFullScreenAction;
KAction *m_aboutBackend;
KAction *m_reload;
......
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="okular_part" version="29">
<kpartgui name="okular_part" version="30">
<MenuBar>
<Menu name="file"><text>&amp;File</text>
<Action name="get_new_stuff" group="file_open"/>
......@@ -77,6 +77,7 @@
</Menu>
<Menu name="settings"><text>&amp;Settings</text>
<Action name="show_leftpanel" group="show_merge"/>
<Action name="show_bottombar" group="show_merge"/>
<Action name="options_configure_generators" group="configure_merge"/>
<Action name="options_configure"/>
</Menu>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment