Skip to content

Commit

Permalink
fixup! UI to match mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaopengLin committed Sep 15, 2024
1 parent 05ab96d commit efccd0c
Show file tree
Hide file tree
Showing 11 changed files with 282 additions and 85 deletions.
1 change: 1 addition & 0 deletions kiwix-desktop.pro
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ QT += printsupport
DETECT_WSL = $$system(test -f /proc/sys/fs/binfmt_misc/WSLInterop && echo true || echo false)
equals(DETECT_WSL , "true"): CONFIG += nostrip
CONFIG += link_pkgconfig
CONFIG += warn_off

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

Expand Down
19 changes: 13 additions & 6 deletions resources/css/popup.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
QTreeView {
border: none;
border: 1px solid #ccc;
background-color: white;
outline: 0px;
}

QTreeView::item {
border: 1px solid transparent;
padding-left: 5px;
padding-right: 5px;
padding-left: 6px;
padding-right: 6px;
font-size: 15px;
line-height: 24px;
}

QTreeView::item:selected {
Expand All @@ -18,10 +20,15 @@ QTreeView::item:selected {

QHeaderView::section {
border: none;
color: grey;
padding: 10px;
padding-bottom: 0px;
color: #3b3b3b;
padding-top: 10px;
padding-left: 10px;
padding-right: 10px;
padding-bottom: 5px;
background-color: white;
font-size: 15px;
line-height: 24px;
font-weight: 400;
}

QScrollBar {
Expand Down
74 changes: 52 additions & 22 deletions resources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ QToolButton {
/* updateCompletion of src/searchbar.cpp references the margin and border */
SearchBar {
background-color: white;
margin: 2px 5px;
margin: 2px;
border: 1px solid #ccc;
border-radius: 3px;

Expand All @@ -45,7 +45,7 @@ SearchBar > QLabel#searchIcon {
padding: 0;
border: none;
background-color: none;
margin: 0px 4px 0px 9px;
margin: 0px 6px;

max-height: 38px;
max-width: 38px;
Expand Down Expand Up @@ -76,35 +76,48 @@ SearchBar > BookmarkButton {
margin-left: 3px;
}

MultiZimButton {
margin-right: 3px;
margin-left: 3px;
}

MultiZimButton QListWidget {
border: none;
background-color: white;
outline: 0px;
padding-top: 5px;
padding-bottom: 5px;
}
MultiZimButton #zimItemWidget {
background-color: transparent;
border:none;
outline: 0px;
padding: none;
margin: none;
}

MultiZimButton QListWidget::item:selected {
border: 1px solid #3366CC;
background-color: #D9E9FF;
#zimItemWidget #textLabel {
padding: 0px;
margin: 0px;
}

MultiZimButton QRadioButton {
MultiZimButton QListWidget::item {
background-color: white;
padding-right: 5px;
padding-left: 5px;
}

MultiZimButton QRadioButton:hover {
MultiZimButton QListWidget::item:hover {
border: 1px solid #3366CC;
background-color: #D9E9FF;
}

MultiZimButton QRadioButton {
background-color: transparent;
outline: none;
}

/* update_display of src/searchbar.cpp references the width and height */
MultiZimButton QRadioButton::indicator {
width: 32px;
height: 32px;
min-width: 22px;
min-height: 22px;
max-height: 22px;
max-width: 22px;
image: none;
}

Expand All @@ -117,12 +130,20 @@ MultiZimButton QScrollBar {
width: 5px;
border: none;
outline: none;
margin: 0px;
}

MultiZimButton QScrollBar::handle {
background-color: grey;
}

MultiZimButton QLabel {
background-color: transparent;
padding: 0px;
margin: 0px;

}

SearchBar > QToolButton:pressed,
SearchBar > QToolButton:hover {
border: 1px solid #3366CC;
Expand All @@ -133,24 +154,33 @@ SearchBar > QToolButton:hover {
#selectAllButton {
border: 1px solid transparent;
background-color: white;
font-size: 20px;
font-weight: bold;
padding: 3px;
font-size: 16px;
font-weight: 500;
padding-top: 5px;
padding-left: 8px;
padding-right: 8px;
padding-bottom: 10px;
}

#selectAllButton::indicator {
width: 20px;
height: 20px;
border: 2px solid black;
border-radius: 3px;
width: 24px;
height: 24px;
image: none;
}

#selectAllButton::indicator:unchecked {
image: url(:/icons/checkbox.svg);
}

#selectAllButton::indicator:checked {
image: url(:/icons/check-solid.svg);
image: url(:/icons/checkbox-active.svg);
}

#selectAllButton:disabled {
background-color: white;
}

#selectAllButton::indicator:disabled {
background-color: #ccc;
}

Expand Down
2 changes: 1 addition & 1 deletion resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"disable-sandbox": "Application was launched from a network drive. This is known to cause compatibility issues due to the sandbox. Do you want to take the risks and disable it?",
"save-page-as": "Save As...",
"load-more": "Load More",
"kiwix-search": "Kiwix Search",
"kiwix-search": "Kiwix search",
"multi-zim-search": "Multi-Zim Search",
"select-all": "Select all"
}
13 changes: 12 additions & 1 deletion resources/icons/checkbox-active.svg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion resources/icons/checkbox.svg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit efccd0c

Please sign in to comment.