Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions data/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,45 @@ launcher progressbar progress {
min-width: 0;
}

launcher.small progressbar {
margin-left: 4px;
margin-right: 4px;
margin-bottom: 4px;
}

launcher.small progressbar trough {
min-height: 1px;
}

launcher.small progressbar progress {
min-height: 1px;
}

launcher.large progressbar trough {
min-height: 6px;
}

launcher.large progressbar {
margin-left: 7px;
margin-right: 7px;
margin-bottom: 7px;
}

launcher.large progressbar progress {
min-height: 6px;
}

launcher.small .badge {
min-width: 18px;
min-height: 18px;
}

launcher.large .badge {
font-size: 16px;
min-width: 28px;
min-height: 28px;
}

tooltip {
margin-bottom: 0.5em;
}
Expand Down
28 changes: 23 additions & 5 deletions src/BaseItem.vala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
*/

public class Dock.BaseItem : Gtk.Box {
private const string CSS_CLASS_LARGE = "large";
private const string CSS_CLASS_SMALL = "small";

public enum State {
ACTIVE,
INACTIVE,
Expand All @@ -30,9 +33,27 @@ public class Dock.BaseItem : Gtk.Box {
*/
public Group group { get; construct; }

public int icon_size { get; set; }
public new string tooltip_text { get; set; }

private int _icon_size;
public int icon_size {
get {
return _icon_size;
}
set {
_icon_size = value;

remove_css_class (CSS_CLASS_LARGE);
remove_css_class (CSS_CLASS_SMALL);

if (icon_size >= 64) {
add_css_class (CSS_CLASS_LARGE);
} else if (icon_size <= 32) {
add_css_class (CSS_CLASS_SMALL);
}
}
}

private double _current_pos = 0.0;
public double current_pos {
get { return _current_pos; }
Expand Down Expand Up @@ -134,10 +155,7 @@ public class Dock.BaseItem : Gtk.Box {

bind_property ("tooltip-text", tooltip_label, "label");

icon_size = dock_settings.get_int ("icon-size");
dock_settings.changed["icon-size"].connect (() => {
icon_size = dock_settings.get_int ("icon-size");
});
dock_settings.bind ("icon-size", this, "icon-size", GET);

fade = new Adw.TimedAnimation (
this, 0, 1,
Expand Down