Skip to content
Permalink
Browse files

Respect icon size in attribute table, use svg icons

  • Loading branch information
nyalldawson committed Jun 20, 2016
1 parent 33d64dc commit 8261275a9ac4e17ee774acd1110f4f42874dac49
Showing with 19 additions and 3 deletions.
  1. +18 −2 src/app/qgsattributetabledialog.cpp
  2. +1 −1 src/ui/qgsattributetabledialog.ui
@@ -99,6 +99,21 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid

QSettings settings;

int size = settings.value( "/IconSize", 16 ).toInt();
if ( size > 32 )
{
size -= 16;
}
else if ( size == 32 )
{
size = 24;
}
else
{
size = 16;
}
mToolbar->setIconSize( QSize( size, size ) );

// Initialize the window geometry
restoreGeometry( settings.value( "/Windows/BetterAttributeTable/geometry" ).toByteArray() );

@@ -188,10 +203,11 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
columnBoxInit();
updateTitle();

mActionRemoveSelection->setIcon( QgsApplication::getThemeIcon( "/mActionUnselectAttributes.png" ) );
mActionRemoveSelection->setIcon( QgsApplication::getThemeIcon( "/mActionDeselectAll.svg" ) );
mActionSelectAll->setIcon( QgsApplication::getThemeIcon( "/mActionSelectAll.svg" ) );
mActionSelectedToTop->setIcon( QgsApplication::getThemeIcon( "/mActionSelectedToTop.png" ) );
mActionCopySelectedRows->setIcon( QgsApplication::getThemeIcon( "/mActionCopySelected.png" ) );
mActionCopySelectedRows->setIcon( QgsApplication::getThemeIcon( "/mActionEditCopy.svg" ) );
mActionPasteFeatures->setIcon( QgsApplication::getThemeIcon( "/mActionEditPaste.svg" ) );
mActionZoomMapToSelectedRows->setIcon( QgsApplication::getThemeIcon( "/mActionZoomToSelected.svg" ) );
mActionPanMapToSelectedRows->setIcon( QgsApplication::getThemeIcon( "/mActionPanToSelected.svg" ) );
mActionInvertSelection->setIcon( QgsApplication::getThemeIcon( "/mActionInvertSelection.svg" ) );
@@ -183,8 +183,8 @@
<addaction name="mActionCopySelectedRows"/>
<addaction name="mActionPasteFeatures"/>
<addaction name="separator"/>
<addaction name="mActionRemoveAttribute"/>
<addaction name="mActionAddAttribute"/>
<addaction name="mActionRemoveAttribute"/>
<addaction name="mActionOpenFieldCalculator"/>
<addaction name="separator"/>
<addaction name="mActionSetStyles"/>

0 comments on commit 8261275

Please sign in to comment.
You can’t perform that action at this time.