Skip to content

Commit 5b4164a

Browse files
committed
Update workflow
1 parent ed8a0e0 commit 5b4164a

File tree

5 files changed

+24
-19
lines changed

5 files changed

+24
-19
lines changed

.github/workflows/blank.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
# Default: ${{ github.token }}
2121
token: ${{ github.token }}
22-
version: 'weekly.2022.24'
22+
version: 'weekly.2023.30'
2323
version-file: ''
2424
check-latest: true
2525
stable: false
@@ -62,7 +62,7 @@ jobs:
6262
with:
6363
# Default: ${{ github.token }}
6464
token: ${{ github.token }}
65-
version: 'weekly.2022.24'
65+
version: 'weekly.2023.30'
6666
version-file: ''
6767
check-latest: true
6868
stable: false
@@ -100,7 +100,7 @@ jobs:
100100
with:
101101
# Default: ${{ github.token }}
102102
token: ${{ github.token }}
103-
version: 'weekly.2022.24'
103+
version: 'weekly.2023.30'
104104
version-file: ''
105105
check-latest: true
106106
stable: false

src/menubar.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fn theme_click(mut win ui.Window, com ui.MenuItem) {
182182
background := gx.rgb(0, 16, 0)
183183
win.id_map['background'] = &background
184184
} else {
185-
background := gx.rgb(230, 235, 245)
185+
background := gx.rgb(210, 220, 240)
186186
win.gg.set_bg_color(background)
187187
win.id_map['background'] = &background
188188
}

src/paint.v

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ fn main() {
120120
cim := win.gg.cache_image(gg_im)
121121
app.bg_id = cim
122122

123+
background := gx.rgb(210, 220, 240)
124+
window.gg.set_bg_color(background)
123125
window.gg.run()
124126
}
125127

@@ -140,13 +142,13 @@ fn image_scrollview_draw_event_fn(mut e ui.DrawEvent) {
140142

141143
// dump('draw')
142144

143-
color := if 'background' in e.ctx.win.id_map {
145+
/*color := if 'background' in e.ctx.win.id_map {
144146
reff := e.ctx.win.get[&gx.Color]('background')
145147
gx.rgb(reff.r, reff.g, reff.b)
146148
} else {
147149
// gx.rgb(210, 220, 240)
148-
gx.rgb(230, 235, 245)
149-
}
150+
gx.rgb(220, 225, 245)
151+
}*/
150152

151-
// e.ctx.gg.draw_rect_filled(app.sv.x, 0, ws.width, ws.height, color)
153+
//e.ctx.gg.draw_rect_filled(app.sv.x, app.sv.y, ws.width, ws.height, color)
152154
}

src/ribbon.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ fn (mut app App) make_ribbon() {
2424
for color in colors {
2525
mut btn := ui.button(text: ' ')
2626
btn.set_background(color)
27-
// btn.extra = 'RGB Value: \n${color.r},${color.g},${color.b}\nAlpha: ${color.a}'
2827
btn.border_radius = 64
2928

3029
btn.set_click_fn(cbc, color)

src/sidebar.v

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,7 @@ fn (mut app App) make_sidebar() {
8383

8484
mut btns := [test, test2, test3, test4, test5, test6, test7, test8, test9]
8585
for mut b in btns {
86-
b.subscribe_event('after_draw', fn (mut e ui.DrawEvent) {
87-
if e.target.is_selected {
88-
mut btn := e.target
89-
x := btn.x + 1
90-
y := btn.y + 1
91-
w := btn.width - 2
92-
h := btn.height - 2
93-
e.ctx.gg.draw_rect_empty(x, y, w, h, e.ctx.theme.text_color)
94-
}
95-
})
86+
b.subscribe_event('after_draw', after_draw_btn)
9687
}
9788

9889
group.subscribe_event('mouse_up', app.group_clicked)
@@ -101,6 +92,19 @@ fn (mut app App) make_sidebar() {
10192
app.sidebar.add_child(hbox)
10293
}
10394

95+
fn after_draw_btn(mut e ui.DrawEvent) {
96+
if e.target.is_selected {
97+
mut btn := e.target
98+
for i in 1 .. 4 {
99+
x := btn.x + i
100+
y := btn.y + i
101+
w := btn.width - (2 * i)
102+
h := btn.height - (2 * i)
103+
e.ctx.gg.draw_rect_empty(x, y, w, h, e.ctx.theme.button_border_hover)
104+
}
105+
}
106+
}
107+
104108
fn (mut app App) group_clicked(mut e ui.MouseEvent) {
105109
}
106110

0 commit comments

Comments
 (0)