Skip to content

Commit

Permalink
[window-menu] Show a slightly less blurry icon when on hidpi
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfin authored and flexiondotorg committed Mar 4, 2021
1 parent 8294ad2 commit 54e86a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions window-menu-applet/window-menu-button.vala
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ namespace WindowWidgets{
public void icon_set(){
if(_window != null){
_icon = _window.get_icon();
_icon = _icon.scale_simple(_icon_size,_icon_size,Gdk.InterpType.HYPER);
_icon = _icon.scale_simple(_icon_size * this.get_scale_factor(),_icon_size * this.get_scale_factor(), Gdk.InterpType.HYPER);

if(!_window.is_active()){
_icon.saturate_and_pixelate(_icon, 0, false);
}
button_image.set_from_pixbuf(_icon);

Cairo.Surface surface = Gdk.cairo_surface_create_from_pixbuf(_icon, this.get_scale_factor(), null);
button_image.set_from_surface(surface);
}
else {
button_image.clear();
Expand Down

0 comments on commit 54e86a0

Please sign in to comment.