WIP: nicer icons, added bookmark button.

This commit is contained in:
Matthias Koefferlein 2020-09-04 18:23:26 +02:00
parent 842501c9e8
commit 6bfed45b5d
12 changed files with 151 additions and 108 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 B

After

Width:  |  Height:  |  Size: 797 B

View File

@ -129,6 +129,8 @@
<file alias="empty_12.png">images/empty_12.png</file>
<file alias="unlocked_16.png">images/unlocked_16.png</file>
<file alias="locked_16.png">images/locked_16.png</file>
<file alias="bookmark.png">images/bookmark.png</file>
<file alias="bookmark_16.png">images/bookmark_16.png</file>
</qresource>
<qresource prefix="/syntax">
<file alias="ruby.xml">syntax/ruby.xml</file>

View File

@ -29,46 +29,23 @@
<property name="spacing">
<number>2</number>
</property>
<item row="0" column="3">
<widget class="QToolButton" name="forward_pb">
<property name="toolTip">
<string>Forward</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../lay/lay/layResources.qrc">
<normaloff>:/forward.png</normaloff>:/forward.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="8">
<item row="0" column="5">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<width>6</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="12">
<item row="1" column="0" colspan="14">
<widget class="QFrame" name="frame">
<property name="minimumSize">
<size>
@ -285,28 +262,28 @@
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<item row="0" column="3">
<widget class="QToolButton" name="forward_pb">
<property name="toolTip">
<string>Forward</string>
</property>
<property name="text">
<string>TextLabel</string>
<string>...</string>
</property>
</widget>
</item>
<item row="0" column="5">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
<property name="icon">
<iconset resource="../../lay/lay/layResources.qrc">
<normaloff>:/forward.png</normaloff>:/forward.png</iconset>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<property name="iconSize">
<size>
<width>6</width>
<height>20</height>
<width>24</width>
<height>24</height>
</size>
</property>
</spacer>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="back_pb">
@ -331,68 +308,6 @@
</property>
</widget>
</item>
<item row="0" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="7">
<widget class="QToolButton" name="next_topic_pb">
<property name="toolTip">
<string>Next Topic</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../lay/lay/layResources.qrc">
<normaloff>:/next_topic.png</normaloff>:/next_topic.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="6">
<widget class="QToolButton" name="prev_topic_pb">
<property name="toolTip">
<string>Previous Topic</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../lay/lay/layResources.qrc">
<normaloff>:/prev_topic.png</normaloff>:/prev_topic.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QToolButton" name="home_pb">
<property name="toolTip">
@ -416,7 +331,99 @@
</property>
</widget>
</item>
<item row="0" column="10">
<item row="0" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="6">
<widget class="QToolButton" name="prev_topic_pb">
<property name="toolTip">
<string>Previous Topic</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../lay/lay/layResources.qrc">
<normaloff>:/prev_topic.png</normaloff>:/prev_topic.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="8">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="11">
<widget class="QToolButton" name="search_button">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../lay/lay/layResources.qrc">
<normaloff>:/find.png</normaloff>:/find.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="7">
<widget class="QToolButton" name="next_topic_pb">
<property name="toolTip">
<string>Next Topic</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../lay/lay/layResources.qrc">
<normaloff>:/next_topic.png</normaloff>:/next_topic.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="12">
<widget class="QLineEdit" name="search_edit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -429,14 +436,46 @@
</property>
</widget>
</item>
<item row="0" column="10">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="0" column="9">
<widget class="QToolButton" name="search_button">
<widget class="QToolButton" name="bookmark_pb">
<property name="toolTip">
<string>Bookmark this location</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../lay/lay/layResources.qrc">
<normaloff>:/find.png</normaloff>:/find.png</iconset>
<normaloff>:/bookmark.png</normaloff>:/bookmark.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>

View File

@ -88,6 +88,7 @@ BrowserPanel::init ()
connect (mp_ui->forward_pb, SIGNAL (clicked ()), this, SLOT (forward ()));
connect (mp_ui->next_topic_pb, SIGNAL (clicked ()), this, SLOT (next ()));
connect (mp_ui->prev_topic_pb, SIGNAL (clicked ()), this, SLOT (prev ()));
connect (mp_ui->bookmark_pb, SIGNAL (clicked ()), this, SLOT (bookmark ()));
connect (mp_ui->home_pb, SIGNAL (clicked ()), this, SLOT (home ()));
connect (mp_ui->search_edit, SIGNAL (textEdited (const QString &)), this, SLOT (search_text_changed (const QString &)));
connect (mp_ui->search_edit, SIGNAL (returnPressed ()), this, SLOT (search_edited ()));
@ -212,6 +213,7 @@ BrowserPanel::refresh_bookmark_list ()
for (std::list<BookmarkItem>::const_iterator i = m_bookmarks.begin (); i != m_bookmarks.end (); ++i) {
QTreeWidgetItem *item = new QTreeWidgetItem (mp_ui->browser_bookmark_view);
item->setData (0, Qt::DisplayRole, tl::to_qstring (i->title));
item->setData (0, Qt::DecorationRole, QIcon (":/bookmark_16.png"));
}
}