Skip to content

Commit

Permalink
Added Ex/Import UI on Reading List
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaopengLin authored and kelson42 committed Aug 11, 2024
1 parent a5f225a commit a324fd9
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 11 deletions.
15 changes: 15 additions & 0 deletions resources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,18 @@ ContentTypeFilter {
font-size: 16px;
margin-bottom: 10px;
}

#readinglistbar QPushButton {
margin-left: 4px;
}

#readinglistbar QPushButton::hover {
border: 1px solid #3366CC;
background-color: #D9E9FF;
border-radius: 3px;
}

#readinglistbar QPushButton::menu-indicator {
width: 0;
height: 0;
}
1 change: 1 addition & 0 deletions resources/icons/more-vertical.svg
Loading
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 resources/kiwix.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@
<file>icons/check-solid.svg</file>
<file>icons/xmark-solid.svg</file>
<file>icons/home-button.svg</file>
<file>icons/more-vertical.svg</file>
</qresource>
</RCC>
5 changes: 5 additions & 0 deletions src/readinglistbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ ReadingListBar::ReadingListBar(QWidget *parent) :
connect(exportAction, &QAction::triggered, this, &ReadingListBar::onExport);
connect(importAction, &QAction::triggered, this, &ReadingListBar::onImport);
ui->label->setText(gt("reading-list-title"));

QMenu *portMenu = new QMenu(this);
portMenu->addAction(exportAction);
portMenu->addAction(importAction);
ui->readingListMenuButton->setMenu(portMenu);
}

ReadingListBar::~ReadingListBar()
Expand Down
61 changes: 50 additions & 11 deletions src/readinglistbar.ui
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,53 @@
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>Reading List</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>Reading List</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="readingListMenuButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources/kiwix.qrc">
<normaloff>:/icons/more-vertical.svg</normaloff>:/icons/more-vertical.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget">
Expand Down Expand Up @@ -68,6 +105,8 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../resources/kiwix.qrc"/>
</resources>
<connections/>
</ui>

0 comments on commit a324fd9

Please sign in to comment.