mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Apply lightness limits in accent colors.
This commit is contained in:
@@ -199,16 +199,17 @@ void ColorsPalette::show(Type type) {
|
||||
const auto colorizer = Window::Theme::ColorizerFrom(
|
||||
*scheme,
|
||||
scheme->accentColor);
|
||||
const auto box = Ui::show(Box<EditColorBox>(
|
||||
auto box = Box<EditColorBox>(
|
||||
tr::lng_settings_theme_accent_title(tr::now),
|
||||
EditColorBox::Mode::HSL,
|
||||
current));
|
||||
current);
|
||||
box->setLightnessLimits(
|
||||
colorizer.lightnessMin,
|
||||
colorizer.lightnessMax);
|
||||
box->setSaveCallback(crl::guard(custom, [=](QColor result) {
|
||||
_selected.fire_copy(result);
|
||||
}));
|
||||
Ui::show(std::move(box));
|
||||
}, custom->lifetime());
|
||||
pushButton(custom);
|
||||
inner->resize(_outer->width(), inner->height());
|
||||
|
Reference in New Issue
Block a user