From ae16b547e625ffbbd7325120317d193b1c001d95 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Tue, 12 Dec 2017 21:04:37 +0800 Subject: [PATCH] themes: refine danger button style --- src/resources/themes/v_pure/v_pure.palette | 22 ++++++++++++-------- src/resources/themes/v_pure/v_pure.qss | 12 ++++++++--- src/resources/themes/v_white/v_white.palette | 22 ++++++++++++-------- src/resources/themes/v_white/v_white.qss | 12 ++++++++--- 4 files changed, 44 insertions(+), 24 deletions(-) diff --git a/src/resources/themes/v_pure/v_pure.palette b/src/resources/themes/v_pure/v_pure.palette index a71be7e3..fc822ca2 100644 --- a/src/resources/themes/v_pure/v_pure.palette +++ b/src/resources/themes/v_pure/v_pure.palette @@ -58,9 +58,14 @@ edit_focus_border=@master_bg edit_selection_fg=@edit_fg edit_selection_bg=#CBD2F9 -danger_red=#C9302C icon_fg=#222222 +danger_fg=#F5F5F5 +danger_bg=#C9302C +danger_focus_bg=#D9534F +danger_hover_bg=#D9534F +danger_pressed_bg=#AC2925 + [soft_defined] ; VAvatar. avatar_border_bg=@selected_bg @@ -78,7 +83,7 @@ bubble_fg=@master_fg bubble_bg=@master_bg ; Icons' foreground. -danger_icon_fg=@danger_red +danger_icon_fg=@danger_bg item_icon_fg=@icon_fg title_icon_fg=@icon_fg @@ -181,12 +186,11 @@ pushbutton_titlebtn_hover_bg=@hover_bg pushbutton_titlebtn_focus_bg=@focus_bg pushbutton_titlebtn_pressed_bg=@pressed_bg -pushbutton_dangerbtn_fg=#FFF -pushbutton_dangerbtn_border=#D43F3A -pushbutton_dangerbtn_bg=#D9534F -pushbutton_dangerbtn_hover_fg=#FFF -pushbutton_dangerbtn_hover_bg=#C9302C -pushbutton_dangerbtn_hover_border=#AC2925 +pushbutton_dangerbtn_fg=@danger_fg +pushbutton_dangerbtn_bg=@danger_bg +pushbutton_dangerbtn_hover_bg=@danger_hover_bg +pushbutton_dangerbtn_focus_bg=@danger_focus_bg +pushbutton_dangerbtn_pressed_bg=@danger_pressed_bg pushbutton_toolboxbtn_active_fg=@master_fg pushbutton_toolboxbtn_active_bg=@master_bg @@ -247,7 +251,7 @@ tabbar_hover_fg=@hover_fg tabbar_hover_bg=@hover_bg tabbar_icon_fg=@icon_fg -tabbar_icon_special_fg=@danger_red +tabbar_icon_special_fg=@danger_bg ; SelectorItem. selectoritem_border=@base_fg diff --git a/src/resources/themes/v_pure/v_pure.qss b/src/resources/themes/v_pure/v_pure.qss index 7bd4404e..f153a16f 100644 --- a/src/resources/themes/v_pure/v_pure.qss +++ b/src/resources/themes/v_pure/v_pure.qss @@ -385,17 +385,23 @@ QPushButton[TitleBtn="true"]:disabled { QPushButton[DangerBtn="true"] { color: @pushbutton_dangerbtn_fg; - border-color: @pushbutton_dangerbtn_border; + border: none; background-color: @pushbutton_dangerbtn_bg; min-width: -1; } QPushButton[DangerBtn="true"]:hover { - color: @pushbutton_dangerbtn_hover_fg; - border-color: @pushbutton_dangerbtn_hover_border; background-color: @pushbutton_dangerbtn_hover_bg; } +QPushButton[DangerBtn="true"]:focus { + background-color: @pushbutton_dangerbtn_focus_bg; +} + +QPushButton[DangerBtn="true"]:pressed { + background-color: @pushbutton_dangerbtn_pressed_bg; +} + QPushButton[DangerBtn="true"]:disabled { color: @pushbutton_disabled_fg; background-color: @pushbutton_disabled_bg; diff --git a/src/resources/themes/v_white/v_white.palette b/src/resources/themes/v_white/v_white.palette index 898c7d52..85de3658 100644 --- a/src/resources/themes/v_white/v_white.palette +++ b/src/resources/themes/v_white/v_white.palette @@ -48,9 +48,14 @@ content_bg=#FFFFFF selection_fg=#000000 selection_bg=#64b5f6 -danger_red=#C9302C icon_fg=#222222 +danger_fg=#F5F5F5 +danger_bg=#C9302C +danger_focus_bg=#D9534F +danger_hover_bg=#D9534F +danger_pressed_bg=#AC2925 + [soft_defined] ; VAvatar. avatar_border_bg=@title_bg @@ -68,7 +73,7 @@ bubble_fg=#FFFFFF bubble_bg=#616161 ; Icons' foreground. -danger_icon_fg=@danger_red +danger_icon_fg=@danger_bg item_icon_fg=@icon_fg title_icon_fg=@icon_fg @@ -163,12 +168,11 @@ pushbutton_titlebtn_hover_bg=@hover_bg pushbutton_titlebtn_focus_bg=@focus_bg pushbutton_titlebtn_pressed_bg=@pressed_bg -pushbutton_dangerbtn_fg=#FFF -pushbutton_dangerbtn_border=#D43F3A -pushbutton_dangerbtn_bg=#D9534F -pushbutton_dangerbtn_hover_fg=#FFF -pushbutton_dangerbtn_hover_bg=#C9302C -pushbutton_dangerbtn_hover_border=#AC2925 +pushbutton_dangerbtn_fg=@danger_fg +pushbutton_dangerbtn_bg=@danger_bg +pushbutton_dangerbtn_hover_bg=@danger_hover_bg +pushbutton_dangerbtn_focus_bg=@danger_focus_bg +pushbutton_dangerbtn_pressed_bg=@danger_pressed_bg button_icon_fg=@icon_fg button_icon_danger_fg=@danger_icon_fg @@ -217,7 +221,7 @@ tabbar_closebutton_hover_bg=@hover_bg tabbar_closebutton_focus_bg=@focus_bg tabbar_icon_fg=@icon_fg -tabbar_icon_special_fg=@danger_red +tabbar_icon_special_fg=@danger_bg ; SelectorItem. selectoritem_border=@base_fg diff --git a/src/resources/themes/v_white/v_white.qss b/src/resources/themes/v_white/v_white.qss index 23742308..807548a6 100644 --- a/src/resources/themes/v_white/v_white.qss +++ b/src/resources/themes/v_white/v_white.qss @@ -350,17 +350,23 @@ QPushButton[TitleBtn="true"]:disabled { QPushButton[DangerBtn="true"] { color: @pushbutton_dangerbtn_fg; - border-color: @pushbutton_dangerbtn_border; + border: none; background-color: @pushbutton_dangerbtn_bg; min-width: -1; } QPushButton[DangerBtn="true"]:hover { - color: @pushbutton_dangerbtn_hover_fg; - border-color: @pushbutton_dangerbtn_hover_border; background-color: @pushbutton_dangerbtn_hover_bg; } +QPushButton[DangerBtn="true"]:focus { + background-color: @pushbutton_dangerbtn_focus_bg; +} + +QPushButton[DangerBtn="true"]:pressed { + background-color: @pushbutton_dangerbtn_pressed_bg; +} + QPushButton[DangerBtn="true"]:disabled { color: @pushbutton_disabled_fg; background-color: @pushbutton_disabled_bg;