From 1d6da3ba0d4ed7e6cf6eb5de532037640fded745 Mon Sep 17 00:00:00 2001 From: kernelkind Date: Thu, 9 Jan 2025 12:42:37 -0500 Subject: [PATCH 1/6] move columns ui Signed-off-by: kernelkind --- assets/icons/move_column_4x.png | Bin 0 -> 1771 bytes crates/notedeck_columns/src/nav.rs | 1 + .../notedeck_columns/src/ui/column/header.rs | 240 +++++++++++++++++- 3 files changed, 229 insertions(+), 12 deletions(-) create mode 100644 assets/icons/move_column_4x.png diff --git a/assets/icons/move_column_4x.png b/assets/icons/move_column_4x.png new file mode 100644 index 0000000000000000000000000000000000000000..e5d1da5ea718743d5eb20af51464171da21f2e6a GIT binary patch literal 1771 zcmV;P)@~0drDELIAGL9O(c600d`2O+f$vv5yP<6pbp-C4(eA1Sfpc-P+doq2C&cIFMjnDVr| zRV*|bC8V$f;4LC)p8$OTDgr_g$o#Z}P&2R905L$K8legR!e@lucB4?(K2=$&!5D%t zCa}S0_Uq@()3e6N%jVICRKaa?wcAFd2i|O0ov)k;U<}Ar0BiL6n=*hp2V{-z4#cVv z<5u2c1A4ZV15Sa+DTi*0_LtP^c=V1~+tavlw zdKSStbpdw2d2%s?@cJ=wH&F?)s12zJ&Ix9vj;D=_7-4R*eMG;-VfgECD#+TAwcr0GCW(VLR%(BgX)4Y8vDJ3c?WRzO_|EBGrKA&653TYicGTsL#$W zMd_?XssXl#E5?t5e_*qr46Ok>7dFdAr<)+eCQ48qD8LjBF{Dk+3|TA<8nPJZf^^*z z*OQE*-dEQKy`gUn5Z99)r1Z)Mx6f32{ck`GP?3U2Qhxip3ZFkJ!xvA!v(Jy)@linC zzaaM%pjrCexSk)M{{sItUcv6(KXBvE3dAMv<0Int8!zfp1KgB;hA;e(m&Ops?fA$b zUg7@K(U-dfa9R4NjN;52o`lv(j~d{v^iLgV=R|eTA;9z1-+2~;4?FIG2~+h6Dq zz|$(x-5p^#NM47BX$io+UIINC^LWM?qUH8r+!7$%hh-3)&>oE6x*+t#{kTG@bFHWR z%icg3ld0lUL7N-00*L!@&%tV-rT~cESrA-fZEgi1pu{u0gt#4)&$d^* z6cmJ9C^Ys;s<{qV$O8GZ_Cd%8f}%1q zNDasjBfxa7ZW$MfiPwk;$q)f@Mg+(iWiw3)c~LV#m_&g5sBtq?1jq}-zzoK5ayuap zi1fcoL--7YoKU6)Ag5sw@&HK(JQx>wO{9`?77_NhmDWtH{{&$A}2l)&F z5V9gTdHa)&7H9V@Nu(PfWCV73m@WZqFqYetSrGI}{M{vh4aS5K15fJ}i3gDg*jA@DqHXdM zFMa)mha~_>Uq6_}(!!n3(obK{G*7J8KRk6{vR@XU7E8hJch_>$m$w8e}TKA;(S#b~om}_^56Bcpv4E zV<1Gp({k#sPE?`}rX|Ix0Ecjzd{4tg0vL~E;fPh96_}-~>HE=;BhCH;EZe-*u2U!5 zd9eDP%hKNSYrvS$5`)yT>79I(K`zt4Ty7O0d{BQqw~?pO+Zh`Hj`H;UR<}5F^@ render_nav_body(ui, app, ctx, nav.routes().last().expect("top"), col), diff --git a/crates/notedeck_columns/src/ui/column/header.rs b/crates/notedeck_columns/src/ui/column/header.rs index 8b61419f..34634bf3 100644 --- a/crates/notedeck_columns/src/ui/column/header.rs +++ b/crates/notedeck_columns/src/ui/column/header.rs @@ -1,4 +1,5 @@ use crate::{ + colors, column::Columns, nav::RenderNavAction, route::Route, @@ -9,7 +10,7 @@ use crate::{ }, }; -use egui::{RichText, Stroke, UiBuilder}; +use egui::{Margin, RichText, Stroke, UiBuilder}; use enostr::Pubkey; use nostrdb::{Ndb, Transaction}; use notedeck::{ImageCache, NotedeckTextStyle}; @@ -20,6 +21,7 @@ pub struct NavTitle<'a> { columns: &'a Columns, deck_author: Option<&'a Pubkey>, routes: &'a [Route], + col_id: usize, } impl<'a> NavTitle<'a> { @@ -29,6 +31,7 @@ impl<'a> NavTitle<'a> { columns: &'a Columns, deck_author: Option<&'a Pubkey>, routes: &'a [Route], + col_id: usize, ) -> Self { NavTitle { ndb, @@ -36,6 +39,7 @@ impl<'a> NavTitle<'a> { columns, deck_author, routes, + col_id, } } @@ -77,10 +81,19 @@ impl<'a> NavTitle<'a> { ui.add_space(chev_x + item_spacing); } - let remove_column = self.title(ui, self.routes.last().unwrap(), back_button_resp.is_some()); - - if remove_column { - Some(RenderNavAction::RemoveColumn) + let title_resp = self.title(ui, self.routes.last().unwrap(), back_button_resp.is_some()); + + if let Some(resp) = title_resp { + match resp { + TitleResponse::RemoveColumn => Some(RenderNavAction::RemoveColumn), + TitleResponse::MoveColumn(to_index) => { + let from = self.col_id; + None // TODO: + // Some(RenderNavAction::SwitchingAction(SwitchingAction::Columns( + // ColumnsAction::Switch(from, to_index), + // ))) + } + } } else if back_button_resp.map_or(false, |r| r.clicked()) { Some(RenderNavAction::Back) } else { @@ -157,6 +170,25 @@ impl<'a> NavTitle<'a> { animation_resp } + fn move_column_button(&self, ui: &mut egui::Ui, icon_width: f32) -> egui::Response { + let img_size = 16.0; + let max_size = icon_width * ICON_EXPANSION_MULTIPLE; + + let img_data = egui::include_image!("../../../../../assets/icons/move_column_4x.png"); + let img = egui::Image::new(img_data).max_width(img_size); + + let helper = AnimationHelper::new(ui, "move-column-button", egui::vec2(max_size, max_size)); + + let cur_img_size = helper.scale_1d_pos_min_max(0.0, img_size); + + let animation_rect = helper.get_animation_rect(); + let animation_resp = helper.take_animation_response(); + + img.paint_at(ui, animation_rect.shrink((max_size - cur_img_size) / 2.0)); + + animation_resp + } + fn delete_button_section(&self, ui: &mut egui::Ui) -> bool { let id = ui.id().with("title"); @@ -186,6 +218,174 @@ impl<'a> NavTitle<'a> { } } + // returns the column index to switch to, if any + fn move_button_section(&mut self, ui: &mut egui::Ui) -> Option { + let cur_id = ui.id().with("move"); + let move_resp = self.move_column_button(ui, 32.0); + if move_resp.clicked() { + ui.data_mut(|d| d.insert_temp(cur_id, true)); + } + + ui.data(|d| d.get_temp(cur_id)).and_then(|val| { + if val { + let resp = self.add_move_tooltip(cur_id, &move_resp); + if move_resp.clicked_elsewhere() || resp.is_some() { + ui.data_mut(|d| d.remove_temp::(cur_id)); + } + resp + } else { + None + } + }) + } + + fn move_tooltip_col_presentation(&mut self, ui: &mut egui::Ui, col: usize) -> egui::Response { + ui.horizontal(|ui| { + self.title_presentation(ui, self.columns.column(col).router().top(), 32.0); + }) + .response + } + + fn add_move_tooltip(&mut self, id: egui::Id, move_resp: &egui::Response) -> Option { + let mut inner_resp = None; + move_resp.show_tooltip_ui(|ui| { + let x_range = ui.available_rect_before_wrap().x_range(); + let is_dragging = egui::DragAndDrop::payload::(ui.ctx()).is_some(); // must be outside ui.dnd_drop_zone to capture properly + let (_, _) = ui.dnd_drop_zone::( + egui::Frame::none() + .inner_margin(Margin::same(8.0)) + .rounding(egui::Rounding::same(8.0)), + |ui| { + let distances: Vec<(egui::Response, f32)> = + self.collect_column_distances(ui, id); + + if let Some((closest_index, closest_resp, distance)) = + self.find_closest_column(&distances) + { + if is_dragging && closest_index != self.col_id { + if self.should_draw_hint(closest_index, distance) { + ui.painter().hline( + x_range, + self.calculate_hint_y( + &distances, + closest_resp, + closest_index, + distance, + ), + egui::Stroke::new(1.0, ui.visuals().text_color()), + ); + } + + if ui.input(|i| i.pointer.any_released()) { + inner_resp = + Some(self.calculate_new_index(closest_index, distance)); + } + } + } + }, + ); + }); + inner_resp + } + + fn collect_column_distances( + &mut self, + ui: &mut egui::Ui, + id: egui::Id, + ) -> Vec<(egui::Response, f32)> { + let y_margin = 4.0; + let item_frame = egui::Frame::none() + .rounding(egui::Rounding::same(8.0)) + .inner_margin(Margin::symmetric(8.0, y_margin)); + + (0..self.columns.num_columns()) + .filter_map(|col| { + let item_id = id.with(col); + let col_resp = if col == self.col_id { + ui.dnd_drag_source(item_id, col, |ui| { + item_frame + .stroke(egui::Stroke::new(2.0, colors::PINK)) + .fill(ui.visuals().panel_fill) + .show(ui, |ui| self.move_tooltip_col_presentation(ui, col)); + }) + .response + } else { + item_frame + .show(ui, |ui| { + self.move_tooltip_col_presentation(ui, col) + .on_hover_cursor(egui::CursorIcon::NotAllowed) + }) + .response + }; + + ui.input(|i| i.pointer.interact_pos()).map(|pointer| { + let distance = pointer.y - col_resp.rect.center().y; + (col_resp, distance) + }) + }) + .collect() + } + + fn find_closest_column( + &'a self, + distances: &'a [(egui::Response, f32)], + ) -> Option<(usize, &'a egui::Response, f32)> { + distances + .iter() + .enumerate() + .min_by(|(_, (_, dist1)), (_, (_, dist2))| { + dist1.abs().partial_cmp(&dist2.abs()).unwrap() + }) + .filter(|(index, (_, distance))| { + (index + 1 != self.col_id && *distance > 0.0) + || (index.saturating_sub(1) != self.col_id && *distance < 0.0) + }) + .map(|(index, (resp, dist))| (index, resp, *dist)) + } + + fn should_draw_hint(&self, closest_index: usize, distance: f32) -> bool { + let is_above = distance < 0.0; + (is_above && closest_index.saturating_sub(1) != self.col_id) + || (!is_above && closest_index + 1 != self.col_id) + } + + fn calculate_new_index(&self, closest_index: usize, distance: f32) -> usize { + let moving_up = self.col_id > closest_index; + match (distance < 0.0, moving_up) { + (true, true) | (false, false) => closest_index, + (true, false) => closest_index.saturating_sub(1), + (false, true) => closest_index + 1, + } + } + + fn calculate_hint_y( + &self, + distances: &[(egui::Response, f32)], + closest_resp: &egui::Response, + closest_index: usize, + distance: f32, + ) -> f32 { + let y_margin = 4.0; + + let offset = if distance < 0.0 { + distances + .get(closest_index.wrapping_sub(1)) + .map(|(above_resp, _)| (closest_resp.rect.top() - above_resp.rect.bottom()) / 2.0) + .unwrap_or(y_margin) + } else { + distances + .get(closest_index + 1) + .map(|(below_resp, _)| (below_resp.rect.top() - closest_resp.rect.bottom()) / 2.0) + .unwrap_or(y_margin) + }; + + if distance < 0.0 { + closest_resp.rect.top() - offset + } else { + closest_resp.rect.bottom() + offset + } + } + fn pubkey_pfp<'txn, 'me>( &'me mut self, txn: &'txn Transaction, @@ -294,23 +494,39 @@ impl<'a> NavTitle<'a> { }; } - fn title(&mut self, ui: &mut egui::Ui, top: &Route, navigating: bool) -> bool { + fn title(&mut self, ui: &mut egui::Ui, top: &Route, navigating: bool) -> Option { if !navigating { - self.title_pfp(ui, top, 32.0); - self.title_label(ui, top); + self.title_presentation(ui, top, 32.0); } ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { if navigating { - self.title_label(ui, top); - self.title_pfp(ui, top, 32.0); - false + self.title_presentation(ui, top, 32.0); + None } else { - self.delete_button_section(ui) + let remove_col = self.delete_button_section(ui); + let move_col = self.move_button_section(ui); + if let Some(col) = move_col { + Some(TitleResponse::MoveColumn(col)) + } else if remove_col { + Some(TitleResponse::RemoveColumn) + } else { + None + } } }) .inner } + + fn title_presentation(&mut self, ui: &mut egui::Ui, top: &Route, pfp_size: f32) { + self.title_pfp(ui, top, pfp_size); + self.title_label(ui, top); + } +} + +enum TitleResponse { + RemoveColumn, + MoveColumn(usize), } fn prev(xs: &[R]) -> Option<&R> { From 10d45d6cc3b15fa2b8baed526efea281033b2f8c Mon Sep 17 00:00:00 2001 From: kernelkind Date: Thu, 9 Jan 2025 12:50:52 -0500 Subject: [PATCH 2/6] move column Signed-off-by: kernelkind --- crates/notedeck_columns/src/column.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/crates/notedeck_columns/src/column.rs b/crates/notedeck_columns/src/column.rs index 97564174..c61c2fea 100644 --- a/crates/notedeck_columns/src/column.rs +++ b/crates/notedeck_columns/src/column.rs @@ -211,6 +211,25 @@ impl Columns { self.new_column_picker(); } } + + pub fn move_col(&mut self, from_index: usize, to_index: usize) { + if from_index == to_index + || from_index >= self.columns.len() + || to_index >= self.columns.len() + { + return; + } + + if from_index < to_index { + for i in from_index..to_index { + self.columns.swap_indices(i, i + 1); + } + } else { + for i in (to_index..from_index).rev() { + self.columns.swap_indices(i, i + 1); + } + } + } } pub enum IntermediaryRoute { From 1914fafc68331cd9f5e532ef55e86a125caa64d0 Mon Sep 17 00:00:00 2001 From: kernelkind Date: Thu, 9 Jan 2025 12:51:30 -0500 Subject: [PATCH 3/6] integrate column moving Signed-off-by: kernelkind --- crates/notedeck_columns/src/column.rs | 2 +- crates/notedeck_columns/src/nav.rs | 3 +++ crates/notedeck_columns/src/ui/column/header.rs | 16 +++++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/crates/notedeck_columns/src/column.rs b/crates/notedeck_columns/src/column.rs index c61c2fea..2af24b6a 100644 --- a/crates/notedeck_columns/src/column.rs +++ b/crates/notedeck_columns/src/column.rs @@ -238,6 +238,6 @@ pub enum IntermediaryRoute { } pub enum ColumnsAction { - // Switch(usize), TODO: could use for keyboard selection + Switch(usize, usize), // from Switch.0 to Switch.1, Remove(usize), } diff --git a/crates/notedeck_columns/src/nav.rs b/crates/notedeck_columns/src/nav.rs index 029fad10..05bf802c 100644 --- a/crates/notedeck_columns/src/nav.rs +++ b/crates/notedeck_columns/src/nav.rs @@ -72,6 +72,9 @@ impl SwitchingAction { ColumnsAction::Remove(index) => { get_active_columns_mut(ctx.accounts, decks_cache).delete_column(index) } + ColumnsAction::Switch(from, to) => { + get_active_columns_mut(ctx.accounts, decks_cache).move_col(from, to); + } }, SwitchingAction::Decks(decks_action) => match *decks_action { DecksAction::Switch(index) => { diff --git a/crates/notedeck_columns/src/ui/column/header.rs b/crates/notedeck_columns/src/ui/column/header.rs index 34634bf3..40cbe275 100644 --- a/crates/notedeck_columns/src/ui/column/header.rs +++ b/crates/notedeck_columns/src/ui/column/header.rs @@ -1,7 +1,9 @@ +use crate::colors; +use crate::column::ColumnsAction; +use crate::nav::RenderNavAction; +use crate::nav::SwitchingAction; use crate::{ - colors, column::Columns, - nav::RenderNavAction, route::Route, timeline::{ColumnTitle, TimelineId, TimelineKind, TimelineRoute}, ui::{ @@ -10,7 +12,8 @@ use crate::{ }, }; -use egui::{Margin, RichText, Stroke, UiBuilder}; +use egui::Margin; +use egui::{RichText, Stroke, UiBuilder}; use enostr::Pubkey; use nostrdb::{Ndb, Transaction}; use notedeck::{ImageCache, NotedeckTextStyle}; @@ -88,10 +91,9 @@ impl<'a> NavTitle<'a> { TitleResponse::RemoveColumn => Some(RenderNavAction::RemoveColumn), TitleResponse::MoveColumn(to_index) => { let from = self.col_id; - None // TODO: - // Some(RenderNavAction::SwitchingAction(SwitchingAction::Columns( - // ColumnsAction::Switch(from, to_index), - // ))) + Some(RenderNavAction::SwitchingAction(SwitchingAction::Columns( + ColumnsAction::Switch(from, to_index), + ))) } } } else if back_button_resp.map_or(false, |r| r.clicked()) { From 23d65898aaf879213ed765bc5d685c50ce7f8f0a Mon Sep 17 00:00:00 2001 From: kernelkind Date: Mon, 13 Jan 2025 15:47:15 -0500 Subject: [PATCH 4/6] use replace move icon with grab Signed-off-by: kernelkind --- .../notedeck_columns/src/ui/column/header.rs | 55 ++++++++++++------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/crates/notedeck_columns/src/ui/column/header.rs b/crates/notedeck_columns/src/ui/column/header.rs index 40cbe275..7f97b4c4 100644 --- a/crates/notedeck_columns/src/ui/column/header.rs +++ b/crates/notedeck_columns/src/ui/column/header.rs @@ -172,25 +172,6 @@ impl<'a> NavTitle<'a> { animation_resp } - fn move_column_button(&self, ui: &mut egui::Ui, icon_width: f32) -> egui::Response { - let img_size = 16.0; - let max_size = icon_width * ICON_EXPANSION_MULTIPLE; - - let img_data = egui::include_image!("../../../../../assets/icons/move_column_4x.png"); - let img = egui::Image::new(img_data).max_width(img_size); - - let helper = AnimationHelper::new(ui, "move-column-button", egui::vec2(max_size, max_size)); - - let cur_img_size = helper.scale_1d_pos_min_max(0.0, img_size); - - let animation_rect = helper.get_animation_rect(); - let animation_resp = helper.take_animation_response(); - - img.paint_at(ui, animation_rect.shrink((max_size - cur_img_size) / 2.0)); - - animation_resp - } - fn delete_button_section(&self, ui: &mut egui::Ui) -> bool { let id = ui.id().with("title"); @@ -223,7 +204,7 @@ impl<'a> NavTitle<'a> { // returns the column index to switch to, if any fn move_button_section(&mut self, ui: &mut egui::Ui) -> Option { let cur_id = ui.id().with("move"); - let move_resp = self.move_column_button(ui, 32.0); + let move_resp = ui.add(grab_button()); if move_resp.clicked() { ui.data_mut(|d| d.insert_temp(cur_id, true)); } @@ -506,8 +487,8 @@ impl<'a> NavTitle<'a> { self.title_presentation(ui, top, 32.0); None } else { - let remove_col = self.delete_button_section(ui); let move_col = self.move_button_section(ui); + let remove_col = self.delete_button_section(ui); if let Some(col) = move_col { Some(TitleResponse::MoveColumn(col)) } else if remove_col { @@ -556,3 +537,35 @@ fn chevron( r } + +fn grab_button() -> impl egui::Widget { + |ui: &mut egui::Ui| -> egui::Response { + let max_size = egui::vec2(48.0, 48.0); + let helper = AnimationHelper::new(ui, "grab", max_size); + let painter = ui.painter_at(helper.get_animation_rect()); + let min_circle_radius = 2.0; + let cur_circle_radius = helper.scale_1d_pos(min_circle_radius); + let horiz_spacing = 4.0; + let vert_spacing = 10.0; + let horiz_from_center = (horiz_spacing + min_circle_radius) / 2.0; + let vert_from_center = (vert_spacing + min_circle_radius) / 2.0; + + let color = ui.style().visuals.noninteractive().fg_stroke.color; + + let middle_left = helper.scale_from_center(-horiz_from_center, 0.0); + let middle_right = helper.scale_from_center(horiz_from_center, 0.0); + let top_left = helper.scale_from_center(-horiz_from_center, -vert_from_center); + let top_right = helper.scale_from_center(horiz_from_center, -vert_from_center); + let bottom_left = helper.scale_from_center(-horiz_from_center, vert_from_center); + let bottom_right = helper.scale_from_center(horiz_from_center, vert_from_center); + + painter.circle_filled(middle_left, cur_circle_radius, color); + painter.circle_filled(middle_right, cur_circle_radius, color); + painter.circle_filled(top_left, cur_circle_radius, color); + painter.circle_filled(top_right, cur_circle_radius, color); + painter.circle_filled(bottom_left, cur_circle_radius, color); + painter.circle_filled(bottom_right, cur_circle_radius, color); + + helper.take_animation_response() + } +} \ No newline at end of file From ec7de41cc3385cb9a263a26e998b2a614ce1c753 Mon Sep 17 00:00:00 2001 From: kernelkind Date: Mon, 13 Jan 2025 15:53:30 -0500 Subject: [PATCH 5/6] toggle move tooltip on button press Signed-off-by: kernelkind --- .../notedeck_columns/src/ui/column/header.rs | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/crates/notedeck_columns/src/ui/column/header.rs b/crates/notedeck_columns/src/ui/column/header.rs index 7f97b4c4..3e89bb0e 100644 --- a/crates/notedeck_columns/src/ui/column/header.rs +++ b/crates/notedeck_columns/src/ui/column/header.rs @@ -204,9 +204,25 @@ impl<'a> NavTitle<'a> { // returns the column index to switch to, if any fn move_button_section(&mut self, ui: &mut egui::Ui) -> Option { let cur_id = ui.id().with("move"); - let move_resp = ui.add(grab_button()); + let mut move_resp = ui.add(grab_button()); + + // showing the hover text while showing the move tooltip causes some weird visuals + if ui.data(|d| d.get_temp::(cur_id).is_none()) { + move_resp = move_resp.on_hover_text("Moves this column to another positon"); + } + if move_resp.clicked() { - ui.data_mut(|d| d.insert_temp(cur_id, true)); + ui.data_mut(|d| { + if let Some(val) = d.get_temp::(cur_id) { + if val { + d.remove_temp::(cur_id); + } else { + d.insert_temp(cur_id, true); + } + } else { + d.insert_temp(cur_id, true); + } + }); } ui.data(|d| d.get_temp(cur_id)).and_then(|val| { @@ -568,4 +584,4 @@ fn grab_button() -> impl egui::Widget { helper.take_animation_response() } -} \ No newline at end of file +} From 5043f00eb3d224011ac68b406f973ca20764517c Mon Sep 17 00:00:00 2001 From: kernelkind Date: Wed, 15 Jan 2025 16:09:11 -0500 Subject: [PATCH 6/6] update colors Signed-off-by: kernelkind --- crates/notedeck_chrome/src/theme.rs | 2 +- crates/notedeck_columns/src/ui/column/header.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/notedeck_chrome/src/theme.rs b/crates/notedeck_chrome/src/theme.rs index 1ec31309..87bb501f 100644 --- a/crates/notedeck_chrome/src/theme.rs +++ b/crates/notedeck_chrome/src/theme.rs @@ -81,7 +81,7 @@ pub fn light_color_theme() -> ColorTheme { // INACTIVE WIDGET inactive_bg_stroke_color: EVEN_DARKER_GRAY, - inactive_bg_fill: LIGHT_GRAY, + inactive_bg_fill: LIGHTER_GRAY, inactive_weak_bg_fill: EVEN_DARKER_GRAY, } } diff --git a/crates/notedeck_columns/src/ui/column/header.rs b/crates/notedeck_columns/src/ui/column/header.rs index 3e89bb0e..a99e5f16 100644 --- a/crates/notedeck_columns/src/ui/column/header.rs +++ b/crates/notedeck_columns/src/ui/column/header.rs @@ -304,7 +304,7 @@ impl<'a> NavTitle<'a> { ui.dnd_drag_source(item_id, col, |ui| { item_frame .stroke(egui::Stroke::new(2.0, colors::PINK)) - .fill(ui.visuals().panel_fill) + .fill(ui.visuals().widgets.noninteractive.bg_stroke.color) .show(ui, |ui| self.move_tooltip_col_presentation(ui, col)); }) .response