MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / update_texture

Method update_texture

plugins/decor/deco-button.cpp:75–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void button_t::update_texture()
76{
77 /**
78 * We render at 100% resolution
79 * When uploading the texture, this gets scaled
80 * to 70% of the titlebar height. Thus we will have
81 * a very crisp image
82 */
83 decoration_theme_t::button_state_t state = {
84 .width = 1.0 * theme.get_title_height(),
85 .height = 1.0 * theme.get_title_height(),
86 .border = 1.0,
87 .hover_progress = hover,
88 };
89
90 auto surface = theme.get_button_surface(type, state);
91 this->button_texture = owned_texture_t{surface};
92 cairo_surface_destroy(surface);
93}
94
95void button_t::add_idle_damage()
96{

Callers

nothing calls this directly

Calls 2

get_title_heightMethod · 0.80
get_button_surfaceMethod · 0.80

Tested by

no test coverage detected