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
|
walletTopIconFg: walletTopLabelFg; // wallet top refresh and menu icons
|
||||||
walletTopIconRipple: #ffffff12; // wallet top menu icon ripple effect
|
walletTopIconRipple: #ffffff12; // wallet top menu icon ripple effect
|
||||||
|
|
||||||
sideBarBg: #36434c; // filters side bar background
|
sideBarBg: #293a4c; // filters side bar background
|
||||||
sideBarTextFg: #93999e; // filters side bar text
|
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
|
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
|
sideBarIconFgActive: #5eb5f7; // filters side bar active item icon
|
||||||
sideBarBadgeBg: #5eb5f7; // filters side bar badge background
|
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
|
sideBarBadgeFg: #ffffff; // filters side bar badge text
|
||||||
|
|
|
||||||
|
|
@ -226,13 +226,6 @@ void SideBarMenu::paint(Painter &p, QRect clip) const {
|
||||||
- _st.margins.left()
|
- _st.margins.left()
|
||||||
- _st.margins.right();
|
- _st.margins.right();
|
||||||
p.fillRect(clip, _st.textBg);
|
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) {
|
for (const auto &item : _items) {
|
||||||
if (y + item.height <= clip.y()) {
|
if (y + item.height <= clip.y()) {
|
||||||
y += item.height;
|
y += item.height;
|
||||||
|
|
@ -240,13 +233,16 @@ void SideBarMenu::paint(Painter &p, QRect clip) const {
|
||||||
} else if (y >= clip.y() + clip.height()) {
|
} else if (y >= clip.y() + clip.height()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
const auto active = (item.data.id == _activeId);
|
||||||
|
if (active) {
|
||||||
|
p.fillRect(0, y, fullWidth, item.height, _st.textBgActive);
|
||||||
|
}
|
||||||
if (item.ripple) {
|
if (item.ripple) {
|
||||||
item.ripple->paint(p, 0, y, fullWidth, &_st.rippleBg->c);
|
item.ripple->paint(p, 0, y, fullWidth, &_st.rippleBg->c);
|
||||||
if (item.ripple->empty()) {
|
if (item.ripple->empty()) {
|
||||||
item.ripple = nullptr;
|
item.ripple = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto active = (item.data.id == _activeId);
|
|
||||||
const auto icon = (active ? item.data.iconActive : item.data.icon);
|
const auto icon = (active ? item.data.iconActive : item.data.icon);
|
||||||
const auto x = (fullWidth - icon->width()) / 2;
|
const auto x = (fullWidth - icon->width()) / 2;
|
||||||
icon->paint(p, x, y + item.data.iconTop, fullWidth);
|
icon->paint(p, x, y + item.data.iconTop, fullWidth);
|
||||||
|
|
|
||||||
|
|
@ -551,13 +551,13 @@ SideBarMenu {
|
||||||
bottomSkip: pixels;
|
bottomSkip: pixels;
|
||||||
style: TextStyle;
|
style: TextStyle;
|
||||||
textBg: color;
|
textBg: color;
|
||||||
|
textBgActive: color;
|
||||||
textFg: color;
|
textFg: color;
|
||||||
textFgActive: color;
|
textFgActive: color;
|
||||||
rippleBg: color;
|
rippleBg: color;
|
||||||
badgeBg: color;
|
badgeBg: color;
|
||||||
badgeBgMuted: color;
|
badgeBgMuted: color;
|
||||||
badgeFg: color;
|
badgeFg: color;
|
||||||
shadow: icon;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultLabelSimple: LabelSimple {
|
defaultLabelSimple: LabelSimple {
|
||||||
|
|
@ -1232,13 +1232,13 @@ defaultSideBarMenu: SideBarMenu {
|
||||||
font: font(11px semibold);
|
font: font(11px semibold);
|
||||||
}
|
}
|
||||||
textBg: sideBarBg;
|
textBg: sideBarBg;
|
||||||
|
textBgActive: sideBarBgActive;
|
||||||
textFg: sideBarTextFg;
|
textFg: sideBarTextFg;
|
||||||
textFgActive: sideBarTextFgActive;
|
textFgActive: sideBarTextFgActive;
|
||||||
rippleBg: shadowFg;
|
rippleBg: sideBarBgRipple;
|
||||||
badgeBg: sideBarBadgeBg;
|
badgeBg: sideBarBadgeBg;
|
||||||
badgeBgMuted: sideBarBadgeFgMuted;
|
badgeBgMuted: sideBarBadgeBgMuted;
|
||||||
badgeFg: sideBarBadgeFg;
|
badgeFg: sideBarBadgeFg;
|
||||||
shadow: icon {{ "slide_shadow", slideFadeOutShadowFg }};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Windows specific title
|
// Windows specific title
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue