Skip to content

Commit

Permalink
resolved pr issues
Browse files Browse the repository at this point in the history
  • Loading branch information
heropj committed Nov 27, 2024
1 parent 25175d8 commit 2632af5
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 75 deletions.
124 changes: 61 additions & 63 deletions resources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ ZimItemWidget QRadioButton::indicator:checked {
}

TopWidget QToolButton:pressed,
TopWidget QToolButton::hover {
TopWidget QToolButton:hover {
border: 1px solid #3366CC;
background-color: #D9E9FF;
border-radius: 3px;
Expand Down Expand Up @@ -352,8 +352,7 @@ QTabBar::scroller {
}

#categorySelector QScrollBar::handle,
#languageSelector QScrollBar::handle,
#readinglistbar QScrollBar {
#languageSelector QScrollBar::handle{
background-color: grey;
}

Expand All @@ -369,99 +368,98 @@ ContentTypeFilter {
spacing: 10;
}

#readinglistbar QLabel {
/* General Style Improvements */
#readinglistbar, #tableofcontentbar {
border-radius: 8px;
padding: 8px;
}

/* Title Label Styling */
#readinglistbar #titleLabel, #tableofcontentbar #titleLabel {
font-size: 24px;
font-weight: bold;
color: #333333;
margin: 10px;
padding: 5px;
}

#readinglistbar QListWidget {
show-decoration-selected: 0;
/* Common List Styling for QListWidget and QTreeWidget */
#readinglistbar QListWidget, #tableofcontentbar QTreeWidget {
border: none;
padding: 5px;
outline: none;
}

#readinglistbar QListWidget::item {
/* List Items Default Style */
#readinglistbar QListWidget::item, #tableofcontentbar QTreeWidget::item {
font-size: 16px;
margin-bottom: 10px;
color: #333333;
height: 32px;
padding: 5px 10px;
border-bottom: 1px solid #E0E0E0;
}

#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;
#readinglistbar QListWidget::item:hover, #tableofcontentbar QTreeWidget::item:hover {
background-color: #F1F8FF;
color: #333333;
border: none;
}

#tableofcontentbar {
background-color: white;
/* Scrollbar Styling */
#readinglistbar QScrollBar, #tableofcontentbar QScrollBar {
width: 8px;
border: none;
}

#tableofcontentbar QTreeWidget,
#tableofcontentbar QLabel,
#tableofcontentbar QFrame {
background-color: white;
#readinglistbar QScrollBar::handle, #tableofcontentbar QScrollBar::handle {
background-color: #CCCCCC;
border-radius: 4px;
}

#tableofcontentbar QTreeWidget {
outline: none;
#readinglistbar QScrollBar::handle:hover, #tableofcontentbar QScrollBar::handle:hover {
background-color: #999999;
}

#tableofcontentbar QTreeWidget::item {
height: 26px;
padding: 0px 10px;
outline: none;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
/* Buttons Styling */
#readinglistbar QPushButton, #tableofcontentbar QPushButton {
font-size: 14px;
padding: 5px;
margin-left: 4px;
background-color: #FFFFFF;
color: #333333;
border: 1px solid #CCCCCC;
border-radius: 4px;
}

#tableofcontentbar QTreeWidget::item:selected,
#tableofcontentbar QTreeWidget::item:hover {
outline: none;
border-top: 1px solid #3366CC;
border-bottom: 1px solid #3366CC;
background-color: #D9E9FF;
color: black;
#readinglistbar QPushButton:hover, #tableofcontentbar QPushButton:hover {
border: 1px solid #3366CC;
background-color: #D9E9FF;
}

#tableofcontentbar QTreeWidget::branch:selected,
#tableofcontentbar QTreeWidget::branch:hover {
outline: none;
border-top: 1px solid #3366CC;
border-bottom: 1px solid #3366CC;
background-color: #D9E9FF;
/* Hide Label Styling */
#tableofcontentbar #hideLabel {
margin: 13px 10px 10px;
font-size: 14px;
color: #555555;
}

#tableofcontentbar QTreeWidget::branch {
image: none;
width: 0px;
height: 0px;
}

#tableofcontentbar #titleLabel {
padding: 0px;
margin: 10px;
#readinglistbar QPushButton::menu-indicator {
width: 0px;
height: 0px;
}

#tableofcontentbar #hideLabel {
margin: 13px 10px 10px; /* 3px to match bottom with titleLabel */
/* To remove extra padding and margin*/
#tableofcontentbar {
padding: 0px;
margin: 0px;

}

#tableofcontentbar QScrollBar {
width: 5px;
border: none;
outline: none;
}

#tableofcontentbar QScrollBar::handle {
background-color: grey;
}

/* ----------------------------------------
Text to Speech Page
Expand Down
3 changes: 2 additions & 1 deletion src/readinglistbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ReadingListBar::ReadingListBar(QWidget *parent) :
ui(new Ui::readinglistbar)
{
ui->setupUi(this);
ui->titleLabel->setText(gt("reading-list-title"));//reading-list-title

connect(KiwixApp::instance()->getLibrary(), &Library::bookmarksChanged,
this, &ReadingListBar::setupList);
connect(ui->listWidget, &QListWidget::itemClicked,
Expand All @@ -37,7 +39,6 @@ ReadingListBar::ReadingListBar(QWidget *parent) :
auto importAction = app->getAction(KiwixApp::ImportReadingListAction);
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);
Expand Down
17 changes: 12 additions & 5 deletions src/readinglistbar.ui
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="titleLabel">
<property name="font">
<font>
<pointsize>16</pointsize>
<pointsize>18</pointsize>
</font>
</property>
<property name="text">
Expand Down Expand Up @@ -64,8 +64,8 @@
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="flat">
Expand All @@ -74,6 +74,13 @@
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget">
Expand All @@ -90,7 +97,7 @@
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
<enum>Qt::ElideRight</enum>
</property>
<property name="isWrapping" stdset="0">
<bool>false</bool>
Expand Down
3 changes: 0 additions & 3 deletions src/tableofcontentbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ TableOfContentBar::TableOfContentBar(QWidget *parent) :
ui(new Ui::tableofcontentbar)
{
ui->setupUi(this);
ui->titleLabel->setFont(QFont("Selawik", 18, QFont::Weight::Medium));
ui->titleLabel->setText(gt("table-of-content"));
ui->hideLabel->setFont(QFont("Selawik", 12));
ui->hideLabel->setTextFormat(Qt::RichText);

/* href is needed to make hide clickable, but not used. So Kiwix it is :) */
ui->hideLabel->setText("<a href=\"https://kiwix.org/en/\">" + gt("hide") + "</a>");
Expand Down
12 changes: 9 additions & 3 deletions src/tableofcontentbar.ui
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
Expand All @@ -41,11 +47,11 @@
<widget class="QLabel" name="titleLabel">
<property name="font">
<font>
<pointsize>16</pointsize>
<pointsize>18</pointsize>
</font>
</property>
<property name="text">
<string/>
<string>Table Of Contents</string>
</property>
<property name="indent">
<number>0</number>
Expand All @@ -68,7 +74,7 @@
<item>
<widget class="QLabel" name="hideLabel">
<property name="text">
<string/>
<string>hide</string>
</property>
<property name="indent">
<number>0</number>
Expand Down

0 comments on commit 2632af5

Please sign in to comment.