add missing light mode icons

Closes: #502
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-11-29 12:42:59 -05:00
committed by William Casarin
parent 6ab8eb078e
commit b581501620
8 changed files with 29 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -352,7 +352,11 @@ fn delete_column_button(
let img_size = 16.0;
let max_size = icon_width * ICON_EXPANSION_MULTIPLE;
let img_data = egui::include_image!("../assets/icons/column_delete_icon_4x.png");
let img_data = if ui.visuals().dark_mode {
egui::include_image!("../assets/icons/column_delete_icon_4x.png")
} else {
egui::include_image!("../assets/icons/column_delete_icon_light_4x.png")
};
let img = egui::Image::new(img_data).max_width(img_size);
let button_rect = {

View File

@@ -370,7 +370,7 @@ impl<'a> NoteView<'a> {
ui.horizontal(|ui| {
ui.vertical(|ui| {
ui.add_space(2.0);
ui.add_sized([20.0, 20.0], repost_icon());
ui.add_sized([20.0, 20.0], repost_icon(ui.visuals().dark_mode));
});
ui.add_space(6.0);
let resp = ui.add(one_line_display_name_widget(
@@ -714,8 +714,12 @@ fn reply_button(ui: &mut egui::Ui, note_key: NoteKey) -> egui::Response {
resp.union(put_resp)
}
fn repost_icon() -> egui::Image<'static> {
let img_data = egui::include_image!("../../../assets/icons/repost_icon_4x.png");
fn repost_icon(dark_mode: bool) -> egui::Image<'static> {
let img_data = if dark_mode {
egui::include_image!("../../../assets/icons/repost_icon_4x.png")
} else {
egui::include_image!("../../../assets/icons/repost_light_4x.png")
};
egui::Image::new(img_data)
}
@@ -726,7 +730,7 @@ fn quote_repost_button(ui: &mut egui::Ui, note_key: NoteKey) -> egui::Response {
let expand_size = 5.0;
let rect = rect.translate(egui::vec2(-(expand_size / 2.0), 0.0));
let put_resp = ui.put(rect, repost_icon().max_width(size));
let put_resp = ui.put(rect, repost_icon(ui.visuals().dark_mode).max_width(size));
resp.union(put_resp)
}

View File

@@ -263,11 +263,14 @@ impl<'a> DesktopSidePanel<'a> {
}
fn settings_button(dark_mode: bool) -> impl Widget {
let _ = dark_mode;
|ui: &mut egui::Ui| {
move |ui: &mut egui::Ui| {
let img_size = 24.0;
let max_size = ICON_WIDTH * ICON_EXPANSION_MULTIPLE; // max size of the widget
let img_data = egui::include_image!("../../assets/icons/settings_dark_4x.png");
let img_data = if dark_mode {
egui::include_image!("../../assets/icons/settings_dark_4x.png")
} else {
egui::include_image!("../../assets/icons/settings_light_4x.png")
};
let img = egui::Image::new(img_data).max_width(img_size);
let helper = AnimationHelper::new(ui, "settings-button", vec2(max_size, max_size));
@@ -285,12 +288,15 @@ fn settings_button(dark_mode: bool) -> impl Widget {
}
fn add_column_button(dark_mode: bool) -> impl Widget {
let _ = dark_mode;
move |ui: &mut egui::Ui| {
let img_size = 24.0;
let max_size = ICON_WIDTH * ICON_EXPANSION_MULTIPLE; // max size of the widget
let img_data = egui::include_image!("../../assets/icons/add_column_dark_4x.png");
let img_data = if dark_mode {
egui::include_image!("../../assets/icons/add_column_dark_4x.png")
} else {
egui::include_image!("../../assets/icons/add_column_light_4x.png")
};
let img = egui::Image::new(img_data).max_width(img_size);
@@ -418,7 +424,11 @@ fn support_button() -> impl Widget {
let img_size = 16.0;
let max_size = ICON_WIDTH * ICON_EXPANSION_MULTIPLE; // max size of the widget
let img_data = egui::include_image!("../../assets/icons/help_icon_dark_4x.png");
let img_data = if ui.visuals().dark_mode {
egui::include_image!("../../assets/icons/help_icon_dark_4x.png")
} else {
egui::include_image!("../../assets/icons/help_icon_inverted_4x.png")
};
let img = egui::Image::new(img_data).max_width(img_size);
let helper = AnimationHelper::new(ui, "help-button", vec2(max_size, max_size));