Better icons: device/app icon chains, volume icons, app icon (#2)
CI / check (push) Successful in 10s
CI / native (push) Successful in 1m10s

This commit was merged in pull request #2.
This commit is contained in:
nandi committed 2026-11-23 01:07:41 +00:00
1 parent f08f241edb
commit 02b08cb471
21 files changed
+658 -70

No files matched your search

+31 -3
View File
@@ -6,6 +6,10 @@ import {
}
// Values
pub const APP_LOOKUP_PREFIX : String = "app:"
pub const ICON_MISSING : String = "image-missing"
pub const MAX_PERCENT : Double = 150.0
pub const METER_DECAY : Double = 0.04
@@ -16,16 +20,28 @@ pub fn clamp_percent(Double) -> Double
pub fn compare_text(String, String) -> Int32
pub fn default_button_icons() -> Array[String]
pub fn device_bus(Node) -> String
pub fn device_icon_chain(Node) -> Array[String]
pub fn diff_rows(Array[Row], Array[Row]) -> Diff
pub fn display_title(Node) -> String
pub fn form_factor_icon(String, NodeKind) -> String
pub fn format_db(Double) -> String
pub fn format_percent(Double) -> String
pub fn format_volume(Array[Double]) -> String
pub fn icon_fallback_device() -> Array[String]
pub fn icon_fallback_stream() -> Array[String]
pub fn linear_to_db(Double) -> Double?
pub fn linear_to_percent(Double) -> Double
@@ -44,6 +60,12 @@ pub fn scale_linked(Array[Double], Double) -> Array[Double]
pub fn should_apply_remote(Int64, Int64, window_us? : Int64) -> Bool
pub fn stream_icon_chain(Node) -> Array[String]
pub fn symbolic(String) -> String
pub fn volume_icon(Double, Bool) -> String
// Errors
// Types and methods
@@ -84,12 +106,16 @@ pub(all) struct Node {
media_class : String
app_name : String
media_name : String
icon_name : String
icon_hints : Array[String]
form_factor : String
bus : String
app_binary : String
app_id : String
volumes : Array[Double]
mute : Bool
}
pub fn Node::kind(Self) -> NodeKind
pub fn Node::new(Int32, String, name? : String, description? : String, app_name? : String, media_name? : String, icon_name? : String, volumes? : Array[Double], mute? : Bool) -> Self
pub fn Node::new(Int32, String, name? : String, description? : String, app_name? : String, media_name? : String, icon_hints? : Array[String], form_factor? : String, bus? : String, app_binary? : String, app_id? : String, volumes? : Array[Double], mute? : Bool) -> Self
#derive(Eq, @debug.Debug)
pub(all) enum NodeKind {
@@ -106,7 +132,8 @@ pub(all) struct Row {
id : Int32
title : String
subtitle : String
icon_name : String
icons : Array[String]
volume_icon : String
volumes : Array[Double]
percent : Double
volume_text : String
@@ -137,6 +164,7 @@ pub(all) enum Tab {
}
pub fn Tab::all() -> Array[Self]
pub fn Tab::empty_text(Self) -> String
pub fn Tab::icon(Self) -> String
pub fn Tab::label(Self) -> String
pub fn Tab::node_kind(Self) -> NodeKind