[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kde4/playground/graphics/okular
From:       Pino Toscano <toscano.pino () tiscali ! it>
Date:       2006-04-01 0:01:10
Message-ID: 1143849670.642460.5914.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 525158 by pino:

Some graphical improvements, most in the sidebar.
Ported the ThumbnailController to QAction.


 M  +2 -0      part.cpp  
 M  +2 -1      ui/minibar.cpp  
 M  +8 -9      ui/thumbnaillist.cpp  
 M  +2 -2      ui/thumbnaillist.h  


--- branches/work/kde4/playground/graphics/okular/part.cpp #525157:525158
@@ -131,6 +131,7 @@
 	m_leftPanel->setMinimumWidth( 90 );
 	m_leftPanel->setMaximumWidth( 300 );
 	QVBoxLayout * leftPanelLayout = new QVBoxLayout( m_leftPanel );
+	leftPanelLayout->setMargin( 0 );
 
 	// widgets: [left toolbox/..] | []
 	m_toolBox = new QToolBox( m_leftPanel );
@@ -173,6 +174,7 @@
 	QWidget * miniBarContainer = new QWidget( m_leftPanel );
 	leftPanelLayout->addWidget( miniBarContainer );
 	QVBoxLayout * miniBarLayout = new QVBoxLayout( miniBarContainer );
+	miniBarLayout->setMargin( 0 );
 	// widgets: [../[spacer/..]] | []
 	QWidget * miniSpacer = new QWidget( miniBarContainer );
 	miniSpacer->setFixedHeight( 6 );
--- branches/work/kde4/playground/graphics/okular/ui/minibar.cpp #525157:525158
@@ -87,6 +87,7 @@
     setObjectName( "miniBar" );
     // left spacer
     QHBoxLayout * horLayout = new QHBoxLayout( this );
+    horLayout->setMargin( 2 );
     QSpacerItem * spacerL = new QSpacerItem( 20, 10, QSizePolicy::Expanding );
     horLayout->addItem( spacerL );
 
@@ -430,7 +431,7 @@
 
 void HoverButton::paintEvent( QPaintEvent * e )
 {
-    if ( testAttribute( Qt::WA_UnderMouse ) )
+    if ( testAttribute( Qt::WA_UnderMouse ) && isEnabled() )
     {
         QPushButton::paintEvent( e );
     }
--- branches/work/kde4/playground/graphics/okular/ui/thumbnaillist.cpp #525157:525158
@@ -543,21 +543,20 @@
 #define FILTERB_ID  1
 
 ThumbnailController::ThumbnailController( QWidget * parent, ThumbnailList * list )
-    : KToolBar( parent, "ThumbsControlBar" )
+    : QToolBar( parent )
 {
+    setObjectName( "ThumbsControlBar" );
     // change toolbar appearance
-    setIconDimensions( 16 );
+    setIconSize( QSize( 16, 16 ) );
     setMovable( false );
 
     // insert a togglebutton [show only bookmarked pages]
     //insertSeparator();
-#warning port that
-/*
-    insertButton( "bookmark", FILTERB_ID, SIGNAL( toggled( bool ) ),
-                  list, SLOT( slotFilterBookmarks( bool ) ),
-                  true, i18n( "Show bookmarked pages only" ) );
-    setToggle( FILTERB_ID );
-    setButton( FILTERB_ID, KpdfSettings::filterBookmarks() );*/
+    QAction * showBoomarkOnlyAction = addAction(
+        KIcon( "bookmark" ), i18n( "Show bookmarked pages only" ) );
+    showBoomarkOnlyAction->setCheckable( true );
+    connect( showBoomarkOnlyAction, SIGNAL( toggled( bool ) ), list, SLOT( slotFilterBookmarks( bool ) ) );
+    showBoomarkOnlyAction->setChecked( KpdfSettings::filterBookmarks() );
     //insertLineSeparator();
 }
 
--- branches/work/kde4/playground/graphics/okular/ui/thumbnaillist.h #525157:525158
@@ -13,7 +13,7 @@
 #include <q3scrollview.h>
 
 #include <kvbox.h>
-#include <ktoolbar.h>
+#include <qtoolbar.h>
 
 #include "core/observer.h"
 
@@ -113,7 +113,7 @@
  * emits signals whenever a button is pressed. A click action results
  * in invoking some method (or slot) in ThumbnailList.
  */
-class ThumbnailController : public KToolBar
+class ThumbnailController : public QToolBar
 {
     public:
         ThumbnailController( QWidget * parent, ThumbnailList * thumbnailList );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic