From 82514c1239a283787aad2fcc34354312268dcb52 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 9 Dec 2013 11:08:54 +0100 Subject: [PATCH 1/2] Icons for shortcuts. --- src/core/defs.h.in | 1 + src/gui/dynamicshortcutswidget.cpp | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) mode change 100644 => 100755 src/core/defs.h.in mode change 100644 => 100755 src/gui/dynamicshortcutswidget.cpp diff --git a/src/core/defs.h.in b/src/core/defs.h.in old mode 100644 new mode 100755 index 4d93683db..abdd0ba2f --- a/src/core/defs.h.in +++ b/src/core/defs.h.in @@ -26,6 +26,7 @@ #define TEXT_TITLE_LIMIT 30 #define MAX_ZOOM_FACTOR 10.0 +#define ICON_SIZE_SETTINGS 16 #define DATABASE_DRIVER "QSQLITE" #define APP_DB_INIT_FILE "db_init.sql" diff --git a/src/gui/dynamicshortcutswidget.cpp b/src/gui/dynamicshortcutswidget.cpp old mode 100644 new mode 100755 index 9e362cb29..6fffd0f02 --- a/src/gui/dynamicshortcutswidget.cpp +++ b/src/gui/dynamicshortcutswidget.cpp @@ -3,6 +3,7 @@ #include #include +#include "core/defs.h" #include "gui/dynamicshortcutswidget.h" #include "gui/shortcutcatcher.h" @@ -63,17 +64,23 @@ void DynamicShortcutsWidget::populate(const QList actions) { m_actionBindings << new_binding; // Add new catcher to our control. - QLabel *label = new QLabel(this); - label->setText(action->text().remove('&')); - label->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); + QLabel *action_label = new QLabel(this); + action_label->setText(action->text().remove('&')); + action_label->setToolTip(action->toolTip()); + action_label->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); - m_layout->addWidget(label, row_id, 0); - m_layout->addWidget(catcher, row_id, 1); + QLabel *action_icon = new QLabel(this); + action_icon->setPixmap(action->icon().pixmap(ICON_SIZE_SETTINGS, ICON_SIZE_SETTINGS)); + action_icon->setToolTip(action->toolTip()); + + m_layout->addWidget(action_icon, row_id, 0); + m_layout->addWidget(action_label, row_id, 1); + m_layout->addWidget(catcher, row_id, 2); row_id++; } // Make sure that "spacer" is added. m_layout->setRowStretch(row_id, 1); - m_layout->setColumnStretch(0, 1); + m_layout->setColumnStretch(1, 1); } From 64d6b82212b4c2331a04d78e104cadbb034f66a0 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 9 Dec 2013 15:09:14 +0100 Subject: [PATCH 2/2] cacsa --- CMakeLists.txt | 2 ++ src/gui/messagesview.h | 0 2 files changed, 2 insertions(+) mode change 100644 => 100755 CMakeLists.txt mode change 100644 => 100755 src/gui/messagesview.h diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 index 889e69833..53ec290ee --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,9 @@ set(MINIMUM_QT_VERSION 4.7.3) set(SOURCE_PACKAGE_SUFFIX "Source") set(EXE_NAME ${APP_LOW_NAME}) +# Options declaration. option(USE_QT_5 "Use Qt 5 for building" OFF) +option(BUNDLE_ICON_THEME "Equip installation with custom icon theme" ON) message(STATUS "[${APP_LOW_NAME}] Welcome to ${APP_NAME} compilation process.") message(STATUS "[${APP_LOW_NAME}] Compilation process begins right now.") diff --git a/src/gui/messagesview.h b/src/gui/messagesview.h old mode 100644 new mode 100755