Skip to content

Commit

Permalink
app: show numbers next to channels on desktop (but not mobile)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfi committed Jan 22, 2025
1 parent bb624ee commit 60a65fe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/app/src/app/schema/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ pub async fn make(app: &App, window: SceneNodePtr) {
channel_y += CHANNEL_LABEL_LINESPACE;

for (i, channel) in CHANNELS.iter().enumerate() {
let text = "#".to_string() + channel;

let node = create_vector_art(&(channel.to_string() + "_channel_label_bg"));
let prop = node.get_property("rect").unwrap();
prop.clone().set_f32(atom, Role::App, 0, 0.).unwrap();
Expand Down Expand Up @@ -219,6 +217,14 @@ pub async fn make(app: &App, window: SceneNodePtr) {
.await;
layer_node.clone().link(node);

// Desktop platforms
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
let text = format!("{}. #{channel}", i + 1);

// Mobile platforms
#[cfg(any(target_os = "android", target_os = "ios"))]
let text = "#".to_string() + channel;

// Create some text
let node = create_text(&(channel.to_string() + "_channel_label"));
let prop = node.get_property("rect").unwrap();
Expand Down

0 comments on commit 60a65fe

Please sign in to comment.