Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
BuffyBox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vladimir Stoiakin
BuffyBox
Commits
7c1d4bd0
Commit
7c1d4bd0
authored
1 year ago
by
Johannes Marbach
Browse files
Options
Downloads
Patches
Plain Diff
Unbreak styling of message box buttons
parent
b226eb18
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
shared/theme.c
+3
-9
3 additions, 9 deletions
shared/theme.c
shared/theme.h
+0
-6
0 additions, 6 deletions
shared/theme.h
shared/themes.c
+0
-12
0 additions, 12 deletions
shared/themes.c
unl0kr/main.c
+1
-1
1 addition, 1 deletion
unl0kr/main.c
with
5 additions
and
28 deletions
CHANGELOG.md
+
1
−
0
View file @
7c1d4bd0
...
...
@@ -16,6 +16,7 @@ If a change only affects particular applications, they are listed in parentheses
-
feat(buffyboard): Allow disabling input devices via config
-
feat(buffyboard): Add CLI flags for overriding geometry & DPI
-
fix(unl0kr): Shutdown message box doesn't close on decline
-
fix(unl0kr): Shutdown message box buttons are unstyled
-
misc: Update lvgl to git master (2023-03-30)
## 3.0.0 (2024-03-22)
...
...
This diff is collapsed.
Click to expand it.
shared/theme.c
+
3
−
9
View file @
7c1d4bd0
...
...
@@ -37,7 +37,6 @@ static struct {
lv_style_t
label
;
lv_style_t
msgbox
;
lv_style_t
msgbox_label
;
lv_style_t
msgbox_btnmatrix
;
lv_style_t
msgbox_background
;
lv_style_t
bar
;
lv_style_t
bar_indicator
;
...
...
@@ -197,10 +196,6 @@ static void init_styles(const bbx_theme *theme) {
lv_style_set_text_align
(
&
(
styles
.
msgbox_label
),
LV_TEXT_ALIGN_CENTER
);
lv_style_set_pad_bottom
(
&
(
styles
.
msgbox_label
),
lv_dpx
(
theme
->
msgbox
.
gap
));
reset_style
(
&
(
styles
.
msgbox_btnmatrix
));
lv_style_set_pad_gap
(
&
(
styles
.
msgbox_btnmatrix
),
lv_dpx
(
theme
->
msgbox
.
buttons
.
gap
));
lv_style_set_min_width
(
&
(
styles
.
msgbox_btnmatrix
),
LV_PCT
(
100
));
reset_style
(
&
(
styles
.
msgbox_background
));
lv_style_set_bg_color
(
&
(
styles
.
msgbox_background
),
lv_color_hex
(
theme
->
msgbox
.
dimming
.
color
));
lv_style_set_bg_opa
(
&
(
styles
.
msgbox_background
),
theme
->
msgbox
.
dimming
.
opacity
);
...
...
@@ -295,10 +290,9 @@ static void apply_theme_cb(lv_theme_t *theme, lv_obj_t *obj) {
return
;
/* Inherit styling from message box */
}
if
(
lv_obj_check_type
(
obj
,
&
lv_buttonmatrix_class
)
&&
lv_obj_check_type
(
lv_obj_get_parent
(
obj
),
&
lv_msgbox_class
))
{
lv_obj_add_style
(
obj
,
&
(
styles
.
msgbox_btnmatrix
),
0
);
lv_obj_add_style
(
obj
,
&
(
styles
.
button
),
LV_PART_ITEMS
);
lv_obj_add_style
(
obj
,
&
(
styles
.
button_pressed
),
LV_PART_ITEMS
|
LV_STATE_PRESSED
);
if
(
lv_obj_check_type
(
obj
,
&
lv_msgbox_footer_button_class
))
{
lv_obj_add_style
(
obj
,
&
(
styles
.
button
),
0
);
lv_obj_add_style
(
obj
,
&
(
styles
.
button_pressed
),
LV_STATE_PRESSED
);
return
;
}
...
...
This diff is collapsed.
Click to expand it.
shared/theme.h
+
0
−
6
View file @
7c1d4bd0
...
...
@@ -123,11 +123,6 @@ typedef struct {
uint32_t
fg_color
;
}
bbx_theme_label
;
/* Message box buttons theme */
typedef
struct
{
lv_coord_t
gap
;
}
bbx_theme_msgbox_buttons
;
/* Message box dimming theme */
typedef
struct
{
uint32_t
color
;
...
...
@@ -143,7 +138,6 @@ typedef struct {
lv_coord_t
corner_radius
;
lv_coord_t
pad
;
lv_coord_t
gap
;
bbx_theme_msgbox_buttons
buttons
;
bbx_theme_msgbox_dimming
dimming
;
}
bbx_theme_msgbox
;
...
...
This diff is collapsed.
Click to expand it.
shared/themes.c
+
0
−
12
View file @
7c1d4bd0
...
...
@@ -154,9 +154,6 @@ static const bbx_theme breezy_light = {
.
corner_radius
=
0
,
.
pad
=
20
,
.
gap
=
20
,
.
buttons
=
{
.
gap
=
5
},
.
dimming
=
{
.
color
=
0x232629
,
.
opacity
=
178
...
...
@@ -312,9 +309,6 @@ static const bbx_theme breezy_dark = {
.
corner_radius
=
0
,
.
pad
=
20
,
.
gap
=
20
,
.
buttons
=
{
.
gap
=
5
},
.
dimming
=
{
.
color
=
0x232629
,
.
opacity
=
178
...
...
@@ -469,9 +463,6 @@ static const bbx_theme pmos_light = {
.
corner_radius
=
3
,
.
pad
=
20
,
.
gap
=
20
,
.
buttons
=
{
.
gap
=
10
},
.
dimming
=
{
.
color
=
0x070c0d
,
.
opacity
=
225
...
...
@@ -626,9 +617,6 @@ static const bbx_theme pmos_dark = {
.
corner_radius
=
3
,
.
pad
=
20
,
.
gap
=
20
,
.
buttons
=
{
.
gap
=
10
},
.
dimming
=
{
.
color
=
0x070c0d
,
.
opacity
=
225
...
...
This diff is collapsed.
Click to expand it.
unl0kr/main.c
+
1
−
1
View file @
7c1d4bd0
...
...
@@ -296,7 +296,7 @@ static void shutdown_mbox_confirmed_cb(lv_event_t *event) {
}
static
void
shutdown_mbox_declined_cb
(
lv_event_t
*
event
)
{
/
/
Find the containing message box for the clicked button
/
*
Find the containing message box for the clicked button
*/
lv_obj_t
*
obj
=
lv_event_get_target
(
event
);
while
(
obj
&&
!
lv_obj_check_type
(
obj
,
&
lv_msgbox_class
))
{
obj
=
lv_obj_get_parent
(
obj
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment