mirror of
https://github.com/labwc/labwc.git
synced 2025-11-07 13:30:06 -05:00
src/ssd: refactor button hover and maximize toggle
This commit is contained in:
parent
02aa000b0d
commit
1149b31c7f
4 changed files with 63 additions and 44 deletions
|
|
@ -23,6 +23,8 @@ struct ssd_button {
|
|||
struct wlr_scene_node *toggled;
|
||||
struct wlr_scene_node *toggled_hover;
|
||||
struct wlr_scene_node *background;
|
||||
struct wlr_scene_tree *icon_tree;
|
||||
struct wlr_scene_tree *hover_tree;
|
||||
|
||||
struct wl_listener destroy;
|
||||
};
|
||||
|
|
@ -47,7 +49,7 @@ struct ssd {
|
|||
* don't update things we don't have to.
|
||||
*/
|
||||
struct {
|
||||
bool squared_corners; /* To un-round corner buttons on maximize */
|
||||
bool was_maximized; /* To un-round corner buttons and toggle icon on maximize */
|
||||
struct wlr_box geometry;
|
||||
struct ssd_state_title {
|
||||
char *text;
|
||||
|
|
@ -99,9 +101,7 @@ struct ssd_part {
|
|||
|
||||
struct ssd_hover_state {
|
||||
struct view *view;
|
||||
struct wlr_scene_node *node;
|
||||
struct wlr_scene_node *old_node;
|
||||
int maximized;
|
||||
struct ssd_button *button;
|
||||
};
|
||||
|
||||
struct wlr_buffer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue