mirror of https://github.com/procxx/kepka.git
Improve accent color choose design.
This commit is contained in:
parent
66d0d6e8fe
commit
bd7cee2252
|
@ -385,10 +385,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"lng_settings_stickers_emoji" = "Stickers and emoji";
|
||||
"lng_settings_messages" = "Messages";
|
||||
"lng_settings_themes" = "Themes";
|
||||
"lng_settings_theme_blue" = "Blue";
|
||||
"lng_settings_theme_day" = "Day";
|
||||
"lng_settings_theme_classic" = "Classic";
|
||||
"lng_settings_theme_midnight" = "Midnight";
|
||||
"lng_settings_theme_matrix" = "Matrix";
|
||||
"lng_settings_theme_tinted" = "Tinted";
|
||||
"lng_settings_theme_night" = "Night";
|
||||
"lng_settings_theme_accent_title" = "Choose accent color";
|
||||
"lng_settings_data_storage" = "Data and storage";
|
||||
"lng_settings_information" = "Edit profile";
|
||||
|
|
|
@ -209,6 +209,6 @@ settingsForwardPrivacyArrowSkip: 32px;
|
|||
settingsForwardPrivacyArrowSize: 6px;
|
||||
settingsForwardPrivacyTooltipPadding: margins(8px, 6px, 8px, 6px);
|
||||
|
||||
settingsAccentColorSize: 48px;
|
||||
settingsAccentColorSkip: 3px;
|
||||
settingsAccentColorLine: 2px;
|
||||
settingsAccentColorSize: 24px;
|
||||
settingsAccentColorSkip: 4px;
|
||||
settingsAccentColorLine: 3px;
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace Settings {
|
|||
namespace {
|
||||
|
||||
const auto kSchemesList = Window::Theme::EmbeddedThemes();
|
||||
constexpr auto kColorsPerRow = 5;
|
||||
constexpr auto kColorsPerRow = 10;
|
||||
|
||||
class ColorsPalette final {
|
||||
public:
|
||||
|
@ -535,12 +535,15 @@ void DefaultTheme::paint(
|
|||
received.height());
|
||||
const auto radius = st::settingsThemeBubbleRadius;
|
||||
|
||||
p.fillRect(
|
||||
QRect(QPoint(), st::settingsThemePreviewSize),
|
||||
_colorized.background);
|
||||
|
||||
PainterHighQualityEnabler hq(p);
|
||||
p.setPen(Qt::NoPen);
|
||||
|
||||
p.setBrush(_colorized.background);
|
||||
p.drawRoundedRect(
|
||||
QRect(QPoint(), st::settingsThemePreviewSize),
|
||||
radius,
|
||||
radius);
|
||||
|
||||
p.setBrush(_colorized.received);
|
||||
p.drawRoundedRect(rtlrect(received, outerWidth), radius, radius);
|
||||
p.setBrush(_colorized.sent);
|
||||
|
|
|
@ -135,7 +135,7 @@ Colorizer ColorizerFrom(const EmbeddedScheme &scheme, const QColor &color) {
|
|||
{ qstr("historyFileOutRadialFg"), Pair{ cColor("4c9ce2"), cColor("2b5278") } }, // msgFileOutBg, msgOutBg
|
||||
{ qstr("historyFileOutRadialFgSelected"), Pair{ cColor("58abf3"), cColor("2e70a5") } }, // msgFileOutBgSelected, msgOutBgSelected
|
||||
} };
|
||||
result.lightnessMin = 96;
|
||||
result.lightnessMin = 64;
|
||||
break;
|
||||
case EmbeddedType::NightGreen:
|
||||
result.keepContrast = base::flat_map<QLatin1String, Pair>{ {
|
||||
|
@ -145,7 +145,7 @@ Colorizer ColorizerFrom(const EmbeddedScheme &scheme, const QColor &color) {
|
|||
{ qstr("overviewCheckFgActive"), Pair{ cColor("3fc1b0"), cColor("282e33") } }, // overviewCheckBgActive
|
||||
{ qstr("callIconFg"), Pair{ cColor("5ad1c1"), cColor("26282c") } }, // callAnswerBg, callBg
|
||||
} };
|
||||
result.lightnessMin = 96;
|
||||
result.lightnessMin = 64;
|
||||
break;
|
||||
}
|
||||
const auto nowLightness = color.lightness();
|
||||
|
@ -374,7 +374,7 @@ std::vector<EmbeddedScheme> EmbeddedThemes() {
|
|||
qColor("ffffff"),
|
||||
qColor("d7f0ff"),
|
||||
qColor("ffffff"),
|
||||
tr::lng_settings_theme_blue,
|
||||
tr::lng_settings_theme_day,
|
||||
":/gui/day-blue.tdesktop-theme",
|
||||
qColor("40a7e3")
|
||||
},
|
||||
|
@ -395,18 +395,18 @@ std::vector<EmbeddedScheme> EmbeddedThemes() {
|
|||
qColor("6b808d"),
|
||||
qColor("6b808d"),
|
||||
qColor("5ca7d4"),
|
||||
tr::lng_settings_theme_midnight,
|
||||
tr::lng_settings_theme_tinted,
|
||||
":/gui/night.tdesktop-theme",
|
||||
qColor("5288c1")
|
||||
},
|
||||
EmbeddedScheme{
|
||||
EmbeddedType::NightGreen,
|
||||
qColor("485761"),
|
||||
qColor("75bfb5"),
|
||||
qColor("6b808d"),
|
||||
qColor("6b808d"),
|
||||
qColor("6b808d"),
|
||||
qColor("75bfb5"),
|
||||
tr::lng_settings_theme_matrix,
|
||||
tr::lng_settings_theme_night,
|
||||
":/gui/night-green.tdesktop-theme",
|
||||
qColor("3fc1b0")
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue