Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button TODO #1297

Open
8 tasks done
johanmalm opened this issue Dec 7, 2023 · 2 comments
Open
8 tasks done

Button TODO #1297

johanmalm opened this issue Dec 7, 2023 · 2 comments

Comments

@johanmalm
Copy link
Collaborator

johanmalm commented Dec 7, 2023

Titlebar button TODO

Re: #1280

  • Fix bug where previous alt_filename is carried over (theme: fix icon bug #1290)
  • Refactor to get rid of new ssd_hover_state variables maximized+old_node (src/ssd: refactor button hover and maximize toggle #1289)
  • Update documentations (make toggled_hover the de facto and hover_toggled the fallback) (Icon refactoring #1305)
  • Revert max_hover_toggled svg/png support. Openbox does not support png/svg so there is no need to support backward compatibility with max_hover_toggled-{active,inactive}.{png,svg} (Icon refactoring #1305)
  • Use better fallback hierarchy where there are missing icons. It's likely that max, iconify, close and menu will need to fallback on to built-in xbm arrays, but foo_hover, foo_toggled, etc should probably fallback onto the foo buffers. (Icon refactoring4 #1339)
  • Refactor xbm fallbacks... consider passing less arguments to button_xbm_load(), and possibly have a dedicated function to load the builtin mask if not file exists. (Icon refactoring4 #1339)
  • Add button overlay (probably best implemented by adding it directly to the buffers) if hover icons does not exist (could make this optional, but is would be a good default option - and avoid regression). (Icon refactoring4 #1339)
  • Try to remove struct ssd_hover_state all together by a pointer-to-a-pointer **icon which we just point to &normal, &toggled, &hover, &toggled_hover in response to cursor movement.
  • Try to remove code duplications in `button_xbm_load().
    button_filename(alt_name, filename, sizeof(filename));
    char *token_buffer = grab_file(filename);
    if (token_buffer) {
    struct token *tokens = tokenize_xbm(token_buffer);
    free(token_buffer);
    pixmap = parse_xbm_tokens(tokens);
    if (tokens) {
    free(tokens);
    }
    (Icon refactoring4 #1339

For later...

  • Consider s/restore/max_toggled/ in theme.c for consistency.
  • Support foo_pressed.xbm
  • Add ASCII representation of the button scene tree
@Consolatis Consolatis added this to the 0.7.0 milestone Dec 7, 2023
@Consolatis
Copy link
Member

Consolatis commented Dec 21, 2023

This seems mostly done (other than the "For later" section). Can we remove it from the 0.7.0 milestone?

@johanmalm
Copy link
Collaborator Author

This seems mostly done (other than the "For later" section). Can we remove it from the 0.7.0 milestone?

Yes

@Consolatis Consolatis removed this from the 0.7.0 milestone Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants