Skip to content

Commit

Permalink
[layouts][needs-docs] Replace layout and report icons
Browse files Browse the repository at this point in the history
The previous layout icon (a blank page) was too difficult to
distinguish from actions relating to pages themselves.

Also fix incorrect tooltips in report designer
  • Loading branch information
nyalldawson committed Feb 23, 2018
1 parent 64aa400 commit 08b75ec
Show file tree
Hide file tree
Showing 15 changed files with 133 additions and 44 deletions.
6 changes: 6 additions & 0 deletions images/images.qrc
Expand Up @@ -641,6 +641,12 @@
<file>themes/default/mActionDuplicateFeatureDigitized.svg</file>
<file>themes/default/mActionDuplicateFeature.svg</file>
<file>themes/default/mActionExport.svg</file>
<file>themes/default/mActionLayoutManager.svg</file>
<file>themes/default/mActionNewLayout.svg</file>
<file>themes/default/mActionDuplicateLayout.svg</file>
<file>themes/default/mIconLayout.svg</file>
<file>themes/default/mActionNewReport.svg</file>
<file>themes/default/mIconReport.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
Expand Down
1 change: 1 addition & 0 deletions images/themes/default/mActionDuplicateLayout.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mActionLayoutManager.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mActionNewLayout.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mActionNewReport.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mIconLayout.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mIconReport.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -4102,16 +4102,28 @@ void QgsLayoutDesignerDialog::updateActionNames( QgsMasterLayoutInterface::Type
{
case QgsMasterLayoutInterface::PrintLayout:
mActionDuplicateLayout->setText( tr( "&Duplicate Layout…" ) );
mActionDuplicateLayout->setToolTip( tr( "Duplicate layout" ) );
mActionDuplicateLayout->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mActionDuplicateLayout.svg" ) ) );
mActionRemoveLayout->setText( tr( "Delete Layout…" ) );
mActionRemoveLayout->setToolTip( tr( "Delete layout" ) );
mActionRenameLayout->setText( tr( "Rename Layout…" ) );
mActionRenameLayout->setToolTip( tr( "Rename layout" ) );
mActionNewLayout->setText( tr( "New Layout…" ) );
mActionNewLayout->setToolTip( tr( "New layout" ) );
mActionNewLayout->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mActionNewLayout.svg" ) ) );
break;

case QgsMasterLayoutInterface::Report:
mActionDuplicateLayout->setText( tr( "&Duplicate Report…" ) );
mActionDuplicateLayout->setToolTip( tr( "Duplicate report" ) );
mActionDuplicateLayout->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mActionDuplicateLayout.svg" ) ) );
mActionRemoveLayout->setText( tr( "Delete Report…" ) );
mActionRemoveLayout->setToolTip( tr( "Delete report" ) );
mActionRenameLayout->setText( tr( "Rename Report…" ) );
mActionRenameLayout->setToolTip( tr( "Rename report" ) );
mActionNewLayout->setText( tr( "New Report…" ) );
mActionNewLayout->setToolTip( tr( "New report" ) );
mActionNewLayout->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mActionNewReport.svg" ) ) );
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/layout/qgsprintlayout.cpp
Expand Up @@ -50,7 +50,7 @@ QgsProject *QgsPrintLayout::layoutProject() const

QIcon QgsPrintLayout::icon() const
{
return QgsApplication::getThemeIcon( QStringLiteral( "mActionNewComposer.svg" ) );
return QgsApplication::getThemeIcon( QStringLiteral( "mIconLayout.svg" ) );
}

QgsLayoutAtlas *QgsPrintLayout::atlas()
Expand Down
2 changes: 1 addition & 1 deletion src/core/layout/qgsreport.cpp
Expand Up @@ -26,7 +26,7 @@ QgsReport::QgsReport( QgsProject *project )

QIcon QgsReport::icon() const
{
return QgsApplication::getThemeIcon( QStringLiteral( "processingResult.svg" ) );
return QgsApplication::getThemeIcon( QStringLiteral( "mIconReport.svg" ) );
}

QgsReport *QgsReport::clone() const
Expand Down
2 changes: 1 addition & 1 deletion src/core/layout/qgsreportsectionlayout.cpp
Expand Up @@ -25,7 +25,7 @@ QgsReportSectionLayout::QgsReportSectionLayout( QgsAbstractReportSection *parent

QIcon QgsReportSectionLayout::icon() const
{
return QgsApplication::getThemeIcon( QStringLiteral( "/mActionNewComposer.svg" ) );
return QgsApplication::getThemeIcon( QStringLiteral( "/mIconLayout.svg" ) );
}

QgsReportSectionLayout *QgsReportSectionLayout::clone() const
Expand Down
8 changes: 5 additions & 3 deletions src/ui/layout/qgslayoutdesignerbase.ui
Expand Up @@ -1193,7 +1193,7 @@
<action name="mActionDuplicateLayout">
<property name="icon">
<iconset resource="../../../images/images.qrc">
<normaloff>:/images/themes/default/mActionDuplicateComposer.svg</normaloff>:/images/themes/default/mActionDuplicateComposer.svg</iconset>
<normaloff>:/images/themes/default/mActionDuplicateLayout.svg</normaloff>:/images/themes/default/mActionDuplicateLayout.svg</iconset>
</property>
<property name="text">
<string>&amp;Duplicate Layout…</string>
Expand All @@ -1220,7 +1220,7 @@
<action name="mActionNewLayout">
<property name="icon">
<iconset resource="../../../images/images.qrc">
<normaloff>:/images/themes/default/mActionNewComposer.svg</normaloff>:/images/themes/default/mActionNewComposer.svg</iconset>
<normaloff>:/images/themes/default/mActionNewLayout.svg</normaloff>:/images/themes/default/mActionNewLayout.svg</iconset>
</property>
<property name="text">
<string>&amp;New Layout…</string>
Expand All @@ -1235,7 +1235,7 @@
<action name="mActionLayoutManager">
<property name="icon">
<iconset resource="../../../images/images.qrc">
<normaloff>:/images/themes/default/mActionComposerManager.svg</normaloff>:/images/themes/default/mActionComposerManager.svg</iconset>
<normaloff>:/images/themes/default/mActionLayoutManager.svg</normaloff>:/images/themes/default/mActionLayoutManager.svg</iconset>
</property>
<property name="text">
<string>Layout &amp;Manager...</string>
Expand Down Expand Up @@ -1549,6 +1549,8 @@
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
</resources>
<connections/>
</ui>
36 changes: 35 additions & 1 deletion src/ui/layout/qgslayoutmanagerbase.ui
Expand Up @@ -19,6 +19,10 @@
<property name="windowTitle">
<string>Layout Manager</string>
</property>
<property name="windowIcon">
<iconset resource="../../../images/images.qrc">
<normaloff>:/images/themes/default/mActionLayoutManager.svg</normaloff>:/images/themes/default/mActionLayoutManager.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QListView" name="mLayoutListView">
Expand Down Expand Up @@ -165,7 +169,37 @@
<tabstop>mTemplatesUserDirBtn</tabstop>
<tabstop>mTemplatesDefaultDirBtn</tabstop>
</tabstops>
<resources/>
<resources>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
</resources>
<connections>
<connection>
<sender>mButtonBox</sender>
Expand Down
13 changes: 7 additions & 6 deletions src/ui/qgisapp.ui
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1018</width>
<width>1030</width>
<height>506</height>
</rect>
</property>
Expand All @@ -16,8 +16,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1018</width>
<height>18</height>
<width>1030</width>
<height>25</height>
</rect>
</property>
<property name="toolTip">
Expand Down Expand Up @@ -2923,7 +2923,7 @@ Acts on currently active editable layer</string>
<action name="mActionShowLayoutManager">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionComposerManager.svg</normaloff>:/images/themes/default/mActionComposerManager.svg</iconset>
<normaloff>:/images/themes/default/mActionLayoutManager.svg</normaloff>:/images/themes/default/mActionLayoutManager.svg</iconset>
</property>
<property name="text">
<string>Layout Manager…</string>
Expand All @@ -2935,7 +2935,7 @@ Acts on currently active editable layer</string>
<action name="mActionNewPrintLayout">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionNewComposer.svg</normaloff>:/images/themes/default/mActionNewComposer.svg</iconset>
<normaloff>:/images/themes/default/mActionNewLayout.svg</normaloff>:/images/themes/default/mActionNewLayout.svg</iconset>
</property>
<property name="text">
<string>New &amp;Print Layout</string>
Expand All @@ -2950,7 +2950,7 @@ Acts on currently active editable layer</string>
<action name="mActionNewReport">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionNewComposer.svg</normaloff>:/images/themes/default/mActionNewComposer.svg</iconset>
<normaloff>:/images/themes/default/mActionNewReport.svg</normaloff>:/images/themes/default/mActionNewReport.svg</iconset>
</property>
<property name="text">
<string>New &amp;Report</string>
Expand Down Expand Up @@ -2989,6 +2989,7 @@ Acts on currently active editable layer</string>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources>
<connections/>
</ui>

0 comments on commit 08b75ec

Please sign in to comment.