Improve side bar layout.
This commit is contained in:
parent
81e9a80831
commit
15af9055ee
3 changed files with 14 additions and 16 deletions
|
|
@ -593,11 +593,13 @@ walletTopLabelFg: #999999; // wallet top updated label text
|
|||
walletTopIconFg: walletTopLabelFg; // wallet top refresh and menu icons
|
||||
walletTopIconRipple: #ffffff12; // wallet top menu icon ripple effect
|
||||
|
||||
sideBarBg: #36434c; // filters side bar background
|
||||
sideBarTextFg: #93999e; // filters side bar text
|
||||
sideBarBg: #293a4c; // filters side bar background
|
||||
sideBarBgActive: #17212c; // filters side bar active background
|
||||
sideBarBgRipple: #1c2835; // filters side bar ripple effect
|
||||
sideBarTextFg: #8897a6; // filters side bar text
|
||||
sideBarTextFgActive: #64b9fa; // filters side bar active item text
|
||||
sideBarIconFg: #979797; // filters side bar icon
|
||||
sideBarIconFg: #8393a3; // filters side bar icon
|
||||
sideBarIconFgActive: #5eb5f7; // filters side bar active item icon
|
||||
sideBarBadgeBg: #5eb5f7; // filters side bar badge background
|
||||
sideBarBadgeFgMuted: #aaaaaa; // filters side bar unimportant badge background
|
||||
sideBarBadgeBgMuted: #aaaaaa; // filters side bar unimportant badge background
|
||||
sideBarBadgeFg: #ffffff; // filters side bar badge text
|
||||
|
|
|
|||
|
|
@ -226,13 +226,6 @@ void SideBarMenu::paint(Painter &p, QRect clip) const {
|
|||
- _st.margins.left()
|
||||
- _st.margins.right();
|
||||
p.fillRect(clip, _st.textBg);
|
||||
_st.shadow.fill(
|
||||
p,
|
||||
QRect(
|
||||
fullWidth - _st.shadow.width(),
|
||||
0,
|
||||
_st.shadow.width(),
|
||||
_inner->height()));
|
||||
for (const auto &item : _items) {
|
||||
if (y + item.height <= clip.y()) {
|
||||
y += item.height;
|
||||
|
|
@ -240,13 +233,16 @@ void SideBarMenu::paint(Painter &p, QRect clip) const {
|
|||
} else if (y >= clip.y() + clip.height()) {
|
||||
break;
|
||||
}
|
||||
const auto active = (item.data.id == _activeId);
|
||||
if (active) {
|
||||
p.fillRect(0, y, fullWidth, item.height, _st.textBgActive);
|
||||
}
|
||||
if (item.ripple) {
|
||||
item.ripple->paint(p, 0, y, fullWidth, &_st.rippleBg->c);
|
||||
if (item.ripple->empty()) {
|
||||
item.ripple = nullptr;
|
||||
}
|
||||
}
|
||||
const auto active = (item.data.id == _activeId);
|
||||
const auto icon = (active ? item.data.iconActive : item.data.icon);
|
||||
const auto x = (fullWidth - icon->width()) / 2;
|
||||
icon->paint(p, x, y + item.data.iconTop, fullWidth);
|
||||
|
|
|
|||
|
|
@ -551,13 +551,13 @@ SideBarMenu {
|
|||
bottomSkip: pixels;
|
||||
style: TextStyle;
|
||||
textBg: color;
|
||||
textBgActive: color;
|
||||
textFg: color;
|
||||
textFgActive: color;
|
||||
rippleBg: color;
|
||||
badgeBg: color;
|
||||
badgeBgMuted: color;
|
||||
badgeFg: color;
|
||||
shadow: icon;
|
||||
}
|
||||
|
||||
defaultLabelSimple: LabelSimple {
|
||||
|
|
@ -1232,13 +1232,13 @@ defaultSideBarMenu: SideBarMenu {
|
|||
font: font(11px semibold);
|
||||
}
|
||||
textBg: sideBarBg;
|
||||
textBgActive: sideBarBgActive;
|
||||
textFg: sideBarTextFg;
|
||||
textFgActive: sideBarTextFgActive;
|
||||
rippleBg: shadowFg;
|
||||
rippleBg: sideBarBgRipple;
|
||||
badgeBg: sideBarBadgeBg;
|
||||
badgeBgMuted: sideBarBadgeFgMuted;
|
||||
badgeBgMuted: sideBarBadgeBgMuted;
|
||||
badgeFg: sideBarBadgeFg;
|
||||
shadow: icon {{ "slide_shadow", slideFadeOutShadowFg }};
|
||||
}
|
||||
|
||||
// Windows specific title
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue