Commit graph

5 commits

Author SHA1 Message Date
tokyo4j
a0cf6bb068 Move "#if HAVE_LIBSFDO" inside desktop-entry.h 2025-01-25 07:27:21 +09:00
Consolatis
4ecedcdb3b desktop-entry: separate icon and app_id icon lookup
This patch splits desktop_entry_icon_lookup() into two separate functions
- desktop_entry_load_icon(): load a icon from the configured icon theme
- desktop_entry_load_icon_from_app_id(): load a icon name from a .desktop
  file based on the given app_id and supply it to _load_icon().

The _load_icon() function will be used in a future menu icon
implementation whereas the _load_icon_from_app_id() function is used
within the SSD titlebar window icon lookup routine.
2025-01-09 00:57:06 +09:00
tokyo4j
16dbdc64e5 ssd: rework titlebar button rendering
- fix that icons for normal/hovered/rounded buttons are not placed
  exactly the same position
- fix blurry window button icons in scaled outputs

This commit introduces lab_img and scaled_img_buffer and uses them for
rendering icons in the window titlebar. Now the process of rendering
button icons are split into 2 phases: loading with lab_img_load() and
creating scene-nodes for them with scaled_img_buffer_create(). This
might incur some additional overhead since we no longer preload icon
textures, but the rendering of icon only happens for the first window
as backing buffers are shared and the overhead won't be noticeable.
This commit also simplifies the process of centering icon buffer in the
button, by creating icon buffers in a fixed geometry via
lab_img_render().
2024-12-23 18:11:32 +09:00
Jens Peters
57aee700f7
sfdo: add sfdo_desktop_entry_name_lookup() 2024-11-19 18:36:54 +01:00
Jens Peters
f69576f8a6
icon-loader: rename to desktop-entry
Also rename `struct icon_loader` to `struct sfdo`.
2024-11-19 18:36:08 +01:00