Skip to content

Commit

Permalink
[browser] small ui reworking for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Sep 15, 2014
1 parent 13eb726 commit 48ebef2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 53 deletions.
6 changes: 2 additions & 4 deletions src/app/qgsbrowserdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,8 @@ QgsBrowserDockWidget::QgsBrowserDockWidget( QString name, QWidget * parent ) :
mBtnCollapse->setIcon( QgsApplication::getThemeIcon( "mActionCollapseTree.png" ) );

mWidgetFilter->hide();
mLeFilter->setPlaceholderText( tr( "Type here to filter current item..." ) );
// icons from http://www.fatcow.com/free-icons License: CC Attribution 3.0
mBtnFilterShow->setIcon( QgsApplication::getThemeIcon( "mActionFilter.png" ) );
mBtnFilter->setIcon( QgsApplication::getThemeIcon( "mActionFilter.png" ) );

QMenu* menu = new QMenu( this );
menu->setSeparatorsCollapsible( false );
Expand Down Expand Up @@ -279,10 +278,9 @@ QgsBrowserDockWidget::QgsBrowserDockWidget( QString name, QWidget * parent ) :
connect( mBtnAddLayers, SIGNAL( clicked() ), this, SLOT( addSelectedLayers() ) );
connect( mBtnCollapse, SIGNAL( clicked() ), mBrowserView, SLOT( collapseAll() ) );
connect( mBtnFilterShow, SIGNAL( toggled( bool ) ), this, SLOT( showFilterWidget( bool ) ) );
connect( mBtnFilter, SIGNAL( clicked() ), this, SLOT( setFilter() ) );
connect( mLeFilter, SIGNAL( returnPressed() ), this, SLOT( setFilter() ) );
connect( mLeFilter, SIGNAL( cleared() ), this, SLOT( setFilter() ) );
// connect( mLeFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( setFilter() ) );
connect( mLeFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( setFilter() ) );
connect( group, SIGNAL( triggered( QAction * ) ), this, SLOT( setFilterSyntax( QAction * ) ) );

connect( mBrowserView, SIGNAL( customContextMenuRequested( const QPoint & ) ), this, SLOT( showContextMenu( const QPoint & ) ) );
Expand Down
53 changes: 4 additions & 49 deletions src/ui/qgsbrowserdockwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@
<string>Add Selected Layers</string>
</property>
<property name="text">
<string>Add</string>
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionAdd.svg</normaloff>:/images/themes/default/mActionAdd.svg</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
Expand Down Expand Up @@ -148,7 +148,7 @@
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
Expand Down Expand Up @@ -192,33 +192,10 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mBtnFilter">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Filter files</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionFilter.png</normaloff>:/images/themes/default/mActionFilter.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QgsFilterLineEdit" name="mLeFilter">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
Expand All @@ -229,12 +206,6 @@
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
Expand All @@ -246,22 +217,6 @@
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
Expand Down

0 comments on commit 48ebef2

Please sign in to comment.