summaryrefslogtreecommitdiff
path: root/src/panes/designer_view.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-07-24 19:12:56 +0200
committerpml68 <contact@pml68.dev>2025-07-24 23:13:50 +0200
commit5f4022cb8aa2fb078617e1c166e0e79b80a25d13 (patch)
tree8515aff6a21d1498ea70e6264f833fc9c0661bb0 /src/panes/designer_view.rs
parentfeat: better button styling for "unsaved changes" dialog (diff)
downloadiced-builder-5f4022cb8aa2fb078617e1c166e0e79b80a25d13.tar.gz
feat: make "Copy Code" button appear on hover over the code
Diffstat (limited to '')
-rw-r--r--src/panes/designer_view.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/panes/designer_view.rs b/src/panes/designer_view.rs
index c4812c5..92364bf 100644
--- a/src/panes/designer_view.rs
+++ b/src/panes/designer_view.rs
@@ -1,7 +1,7 @@
+use iced::Length;
use iced::widget::{
- button, center, container, pane_grid, responsive, row, text, themer,
+ button, center, container, pane_grid, responsive, text, themer,
};
-use iced::{Alignment, Length};
use iced_material::Theme;
use super::style;
@@ -30,21 +30,15 @@ pub fn view<'a>(
};
let content = container(themer(designer_theme, el_tree))
- .id(iced::widget::container::Id::new("drop_zone"))
+ .id("drop_zone")
.height(Length::Fill)
.width(Length::Fill);
let title_bar = pane_grid::TitleBar::new(text("Designer").center())
.controls(pane_grid::Controls::dynamic(
- row![
- button("Switch to Code view")
- .on_press(DesignerPane::CodeView.into(),)
- ]
- .align_y(Alignment::Center),
- row![
- button(icon::switch()).on_press(DesignerPane::CodeView.into(),)
- ]
- .align_y(Alignment::Center),
+ button("Switch to Code view")
+ .on_press(DesignerPane::CodeView.into()),
+ button(icon::switch()).on_press(DesignerPane::CodeView.into()),
))
.padding(10)
.style(style::title_bar);