Overhaul icons: bundled Lucide symbolics, soft tiles, mixer app icon, container host icons
CI / check (pull_request) Successful in 10s
CI / native (pull_request) Successful in 1m15s

This commit is contained in:
Sprite committed 2026-11-23 05:35:32 +00:00
1 parent b1f0965e02
commit 011dab35a2
47 files changed
+970 -158

No files matched your search

+36 -2
View File
@@ -110,6 +110,9 @@ extern "C" fn ffi_image_new(icon : Bytes, size : Int32) -> Widget = "mm_gtk_imag
#borrow(icon)
extern "C" fn ffi_image_set_icon(img : Widget, icon : Bytes) = "mm_gtk_image_set_icon"
///|
extern "C" fn ffi_image_set_pixel_size(img : Widget, size : Int32) = "mm_gtk_image_set_pixel_size"
///|
#borrow(name)
extern "C" fn ffi_has_icon(name : Bytes) -> Int32 = "mm_gtk_has_icon"
@@ -169,6 +172,10 @@ extern "C" fn ffi_set_margins(w : Widget, m : Int32) = "mm_gtk_widget_set_margin
#borrow(cls)
extern "C" fn ffi_add_css_class(w : Widget, cls : Bytes) = "mm_gtk_widget_add_css_class"
///|
#borrow(cls)
extern "C" fn ffi_remove_css_class(w : Widget, cls : Bytes) = "mm_gtk_widget_remove_css_class"
///|
extern "C" fn ffi_set_visible(w : Widget, v : Int32) = "mm_gtk_widget_set_visible"
@@ -178,6 +185,12 @@ extern "C" fn ffi_set_sensitive(w : Widget, v : Int32) = "mm_gtk_widget_set_sens
///|
extern "C" fn ffi_set_valign_center(w : Widget) = "mm_gtk_widget_set_valign_center"
///|
extern "C" fn ffi_set_halign_center(w : Widget) = "mm_gtk_widget_set_halign_center"
///|
extern "C" fn ffi_set_vexpand(w : Widget, v : Int32) = "mm_gtk_widget_set_vexpand"
///|
#borrow(path)
extern "C" fn ffi_save_png(w : Widget, path : Bytes) -> Int32 = "mm_gtk_save_png"
@@ -460,6 +473,11 @@ pub fn Widget::set_icon(self : Widget, icon : String) -> Unit {
ffi_image_set_icon(self, cstr(icon))
}
///|
pub fn Widget::set_pixel_size(self : Widget, size : Int32) -> Unit {
ffi_image_set_pixel_size(self, size)
}
///|
/// A slider from 0 to `max` with a mark at `norm`. Returns (widget, tag).
pub fn scale(
@@ -549,6 +567,11 @@ pub fn Widget::add_css_class(self : Widget, cls : String) -> Unit {
ffi_add_css_class(self, cstr(cls))
}
///|
pub fn Widget::remove_css_class(self : Widget, cls : String) -> Unit {
ffi_remove_css_class(self, cstr(cls))
}
///|
pub fn Widget::set_visible(self : Widget, v : Bool) -> Unit {
ffi_set_visible(self, int(v))
@@ -564,6 +587,16 @@ pub fn Widget::set_valign_center(self : Widget) -> Unit {
ffi_set_valign_center(self)
}
///|
pub fn Widget::set_halign_center(self : Widget) -> Unit {
ffi_set_halign_center(self)
}
///|
pub fn Widget::set_vexpand(self : Widget, v : Bool) -> Unit {
ffi_set_vexpand(self, int(v))
}
///|
/// Render the widget offscreen to a PNG file (for headless screenshots).
pub fn Widget::save_png(self : Widget, path : String) -> Bool {
@@ -585,8 +618,9 @@ pub fn app_icon(key : String) -> String {
///|
/// First entry of an icon chain (see @model.device_icon_chain) that the theme
/// has. "app:<key>" entries are looked up in the .desktop files. The last
/// entry is returned if nothing matches, so the result is never empty.
/// has or that resolves on disk. "app:<key>" entries are looked up in the
/// .desktop files (and may resolve to a theme icon name or "file:<path>").
/// The last entry is returned if nothing matches, so the result is never empty.
pub fn resolve_icon(chain : Array[String]) -> String {
for name in chain {
if name.has_prefix("app:") {