This repository has been archived by the owner on Jun 16, 2021. It is now read-only.
forked from jpfleury/clearlooks-phenix
-
Notifications
You must be signed in to change notification settings - Fork 1
/
murrine-notes.txt
149 lines (102 loc) · 4.5 KB
/
murrine-notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
glossary:
"always global" = only set once globally in gtkrc of this style
glaze:
signature:
cr, fill,
shade-glow, shade-highlight, shade-lightborder,
gradient, widget,
x, y, w, h,
radius, corners, horizontal
basic gradient:
# if custom colors are not used
color = fill
shade(fill, 1.1), fill 49%, fill 49%, shade(fill, 1.1)
highlight with glazestyle=0 "flat" (always global):
color = shade(fill, highlight_shade)
highlight_shade = 1.0 global, overidden in some places
cairo_rectangle (cr, x, y, width, height/2)
linear-gradient( x, y, 0, h,
shade1, shade2 49%, shade3 49%, shade4 )
shades:
# globals from gtkrc, only overidden for murrine-notebook
shade1 = 1.02
shade2 = 1.01
# shade3 = 0.96 - not used as only top half is covered by rect with glazestyle=0
# shade4 = 0.95
shade* = alpha(shade*, 0.8) # alpha=true + global rgba=false
glow-shade = 1.15 (always global), glowstyle=4 "center (horizontal)" (always global):
color = shade(fill, 1.15)
radial-gradient:
scaling-factor = 1.2 * w/h
p0: cx=(x+w/2) / scaling-factor, cy=y+h/2, r=0, c=alpha(glow, 0.5)
p1: r=h/2, c=alpha(glow, 0)
lightborder-shade = 0.95 (always global), lightborderstyle=1 "all sides" (always global):
# inset/outset border drawn via top-down gradient with shades similar to highlight,
# but on top of everything with alpha=0.5 (lightborderstyle=1)
# should probably be replaced by average color on sides in css version
color = shade(fill, 1.15)
murrine_draw_lightborder (cr, fill, mrn_gradient,
x+0.5, y+0.5, width-1, height-1,
mrn_gradient.gradients,
widget->glazestyle, widget->lightborderstyle,
lightborder_shade*highlight_shade, radius, corners);
top_alpha = mid_alpha = bottom_alpha = lower_alpha = 0.5;
toolbar toolbarstyle=2 "gradient":
# only overidden for murrine-evo-new-button-workaround
fill = bg-normal
linear-gradient( x,y,0,h, fill, shade(fill, 0.95) )
# double shades[] = {1.065, 0.95, 0.896, 0.82, 0.75, 0.665, 0.5, 0.45, 0.4};
# with murrine_get_contrast(shade, 0.9) adjustment:
# [1.0585] + [round(n - (1.0 - n) * (1.0 - 0.9), 4) for n in [0.95, 0.896, 0.82, 0.75, 0.665, 0.5, 0.45, 0.4]]
# [1.0585, 0.945, 0.8856, 0.802, 0.725, 0.6315, 0.45, 0.395, 0.34]
1px line on top:
contrast = 0.9 (always global)
color = shade(bg_normal, murrine_get_contrast(shade[0], contrast))
murrine_style_realize: 1.065 - (1.065 - 1.0) * (1.0 - 0.9) = 1.0585
= shade(#e6ddd5, 1.0585)
1px line at the bottom:
color = shade(bg_normal, murrine_get_contrast(shade[4], contrast))
toolbar-button: # too tricky to parse, lot of mixing, used subtracted color with alpha
menubar menubarstyle=2 "gradient" (always global):
fill = bg-normal
linear-gradient( x,y,0,h, fill, shade(fill, 0.95) )
1px line at the bottom: color = shade[4]
menu_frame menustyle=0 "no vertical menu stripe" (always global):
fill = bg_normal + MENU_OPACITY
border = shade[5] + MENU_OPACITY
# with MENU_OPACITY=0.9 (support.h), color does not match gtk2 one, not sure why
# mix(#fff, fill, 0.6) + alpha(border, 0.6) seem to be a better match
separator - default two-flat-line style:
murrine_shade (&colors->bg[0], murrine_get_contrast(0.7, widget->contrast), &dark)
murrine_shade (&colors->bg[0], murrine_get_contrast(1.3, widget->contrast), &highlight)
line-left:
1px murrine_set_color_rgba (cr, &dark, 0.5)
alpha(shade(bg_normal, 0.7 + (1.0-0.7) * (1.0-0.9) = 0.73), 0.5)
line-right:
1px murrine_set_color_rgba (cr, &highlight, 0.5)
alpha(shade(bg_normal, 1.3 + (1.3-1.0)*(0.9-1.0) = 1.27), 0.5)
entry reliefstyle=2 "shadow" (always global):
border:
border = colors->shade[widget->disabled ? 4 : 5];
murrine_shade (&border, 0.92, &border);
murrine_draw_inset (cr, &widget->parentbg, 0, 0, width-1, height-1, radius+1, widget->corners);
shadow:
normal:
base = &colors->base[widget->state_type] = shade(theme_bg, 0.65)
murrine_shade (base, 1.15, &highlight);
murrine_set_color_rgba (cr, &highlight, widget->disabled ? 0.3 : 0.6);
focus:
murrine_shade (&border, 1.54, &focus_shadow);
murrine_set_color_rgba (cr, &focus_shadow, 0.5);
scrollbar:
slider:
fill = colors->bg[widget->state_type]
border:
murrine_shade (&colors->shade[7], 0.95, &border);
murrine_mix_color (&border, &fill, 0.5, &border);
# uses same murrine_draw_glaze
trough:
# murrine_draw_trough with default gradient in cairo-support.c
# rounded rect with flat trough_shades[0] -> trough_shades[1] top-down gradient
trough_shades[0] = trough_shades[1] = 1.0 - flat color
-----