| 73 | } |
| 74 | |
| 75 | void 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 | |
| 95 | void button_t::add_idle_damage() |
| 96 | { |
nothing calls this directly
no test coverage detected