mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Palette usage improvements.
This commit is contained in:
@@ -584,7 +584,7 @@ void MultiSelect::Inner::paintEvent(QPaintEvent *e) {
|
||||
_iconOpacity.step(ms);
|
||||
|
||||
auto paintRect = e->rect();
|
||||
p.fillRect(paintRect, st::windowBg);
|
||||
p.fillRect(paintRect, _st.bg);
|
||||
|
||||
auto offset = QPoint(rtl() ? _st.padding.right() : _st.padding.left(), _st.padding.top());
|
||||
p.translate(offset);
|
||||
|
@@ -26,7 +26,7 @@ class InputField;
|
||||
|
||||
namespace Ui {
|
||||
|
||||
class IconButton;
|
||||
class MaskButton;
|
||||
|
||||
class MultiSelect : public TWidget {
|
||||
public:
|
||||
@@ -154,7 +154,7 @@ private:
|
||||
int _fieldTop = 0;
|
||||
int _fieldWidth = 0;
|
||||
ChildWidget<InputField> _field;
|
||||
ChildWidget<Ui::IconButton> _cancel;
|
||||
ChildWidget<Ui::MaskButton> _cancel;
|
||||
|
||||
int _newHeight = 0;
|
||||
IntAnimation _height;
|
||||
|
@@ -112,7 +112,8 @@ void PopupMenu::paintEvent(QPaintEvent *e) {
|
||||
return;
|
||||
}
|
||||
|
||||
p.fillRect(clip, st::almostTransparent);
|
||||
// This is the minimal alpha value that allowed mouse tracking in OS X.
|
||||
p.fillRect(clip, QColor(255, 255, 255, 13));
|
||||
p.setCompositionMode(compositionMode);
|
||||
|
||||
_shadow.paint(p, _inner, _st.shadowShift);
|
||||
|
@@ -41,6 +41,22 @@ IconButton {
|
||||
duration: int;
|
||||
}
|
||||
|
||||
MaskButton {
|
||||
width: pixels;
|
||||
height: pixels;
|
||||
|
||||
bg: color;
|
||||
icon: icon;
|
||||
|
||||
iconBg: color;
|
||||
iconBgOver: color;
|
||||
|
||||
iconPosition: point;
|
||||
downIconPosition: point;
|
||||
|
||||
duration: int;
|
||||
}
|
||||
|
||||
MediaSlider {
|
||||
width: pixels;
|
||||
activeFg: color;
|
||||
@@ -92,6 +108,7 @@ MultiSelectItem {
|
||||
}
|
||||
|
||||
MultiSelect {
|
||||
bg: color;
|
||||
padding: margins;
|
||||
maxHeight: pixels;
|
||||
scroll: flatScroll;
|
||||
@@ -103,7 +120,7 @@ MultiSelect {
|
||||
fieldMinWidth: pixels;
|
||||
fieldIcon: icon;
|
||||
fieldIconSkip: pixels;
|
||||
fieldCancel: IconButton;
|
||||
fieldCancel: MaskButton;
|
||||
fieldCancelSkip: pixels;
|
||||
}
|
||||
|
||||
@@ -173,6 +190,12 @@ defaultIconButton: IconButton {
|
||||
duration: 150;
|
||||
}
|
||||
|
||||
defaultMaskButton: MaskButton {
|
||||
iconPosition: point(-1px, -1px);
|
||||
downIconPosition: point(-1px, -1px);
|
||||
duration: 150;
|
||||
}
|
||||
|
||||
widgetSlideDuration: 200;
|
||||
widgetFadeDuration: 200;
|
||||
|
||||
@@ -191,10 +214,10 @@ defaultMenuArrow: icon {{ "dropdown_submenu_arrow", #373737 }};
|
||||
defaultMenu: Menu {
|
||||
skip: 5px;
|
||||
|
||||
itemBg: white;
|
||||
itemBg: windowBg;
|
||||
itemBgOver: windowOverBg;
|
||||
itemFg: black;
|
||||
itemFgOver: black;
|
||||
itemFg: windowTextFg;
|
||||
itemFgOver: windowTextFg;
|
||||
itemFgDisabled: #cccccc;
|
||||
itemFgShortcut: #999999;
|
||||
itemFgShortcutOver: #7c99b2;
|
||||
|
Reference in New Issue
Block a user