mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use an explicit gradient instead of a second color in the theme
This commit is contained in:
parent
3e53d5fc07
commit
21e805c6ca
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
DARK = '#39322B'
|
DARK = '#39322B'
|
||||||
LIGHT = '#F6F3E9'
|
LIGHT = '#F6F3E9'
|
||||||
LIGHT2 = '#d6d3c8'
|
LIGHT_GRADIENT = 'linear-gradient(to bottom, ' + LIGHT + ', #b6b3a8)'
|
||||||
|
|
||||||
def get_color(name):
|
def get_color(name):
|
||||||
return {
|
return {
|
||||||
@ -27,7 +27,7 @@ def get_color(name):
|
|||||||
|
|
||||||
# Dialog colors
|
# Dialog colors
|
||||||
'dialog-background': LIGHT,
|
'dialog-background': LIGHT,
|
||||||
'dialog-background2': LIGHT2,
|
'dialog-background-image': LIGHT_GRADIENT,
|
||||||
'dialog-foreground': DARK,
|
'dialog-foreground': DARK,
|
||||||
}[name]
|
}[name]
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class ModalContainer:
|
|||||||
min_width='25vw', max_width='75vw',
|
min_width='25vw', max_width='75vw',
|
||||||
border_radius='1em', padding='1em 2em', margin_right='1em', margin_left='1em',
|
border_radius='1em', padding='1em 2em', margin_right='1em', margin_left='1em',
|
||||||
background=get_color('dialog-background'), color=get_color('dialog-foreground'),
|
background=get_color('dialog-background'), color=get_color('dialog-foreground'),
|
||||||
background_image=str.format('linear-gradient(to bottom, {}, {})', get_color('dialog-background'), get_color('dialog-background2'))
|
background_image=get_color('dialog-background-image'), get_color('dialog-background'), get_color('dialog-background2')
|
||||||
)
|
)
|
||||||
|
|
||||||
# Close button style
|
# Close button style
|
||||||
|
Loading…
x
Reference in New Issue
Block a user