Skip to content

Commit db4e08e

Browse files
committed
feat: app icon in titlebar
1 parent ccfe0e2 commit db4e08e

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎player/rsrc/tiny_ryo_2.png‎

3.46 KB
Loading

‎player/src/gui.rs‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,11 +1069,19 @@ fn add_bar(win: &mut DoubleWindow, close_message: UIEvent, title: &str) {
10691069
3,
10701070
win.width() - 8,
10711071
17,
1072-
Color::from_rgb(56, 85, 145),
1073-
Color::from_rgb(166, 202, 240),
1072+
Color::from_rgb(8, 36, 107), //Color::from_rgb(56, 85, 145),
1073+
Color::from_rgb(165, 203, 247), //Color::from_rgb(166, 202, 240),
10741074
);
1075+
let mut icon = Group::new(4, 4, 16, 16, "");
1076+
icon.set_image(Some(
1077+
fltk::image::PngImage::from_data(include_bytes!("../rsrc/tiny_ryo_2.png")).unwrap(),
1078+
));
1079+
icon.set_align(Align::ImageBackdrop);
1080+
1081+
bar.add(&icon);
1082+
10751083
let t = title.to_owned();
1076-
let mut bar_title = Frame::new(7, 3, 100, 17, "").with_label(&t);
1084+
let mut bar_title = Frame::new(20, 3, 100, 17, "").with_label(&t);
10771085
bar_title.set_align(Align::Left | Align::Inside);
10781086
bar_title.set_label_font(Font::HelveticaBold);
10791087
bar_title.set_label_size(12);

0 commit comments

Comments
 (0)