forked from 1b-agent/opencadstudio-upstream
Right-edge toolbar centres below the view cube and UCS list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5a31d2089a
commit
4d9379ad6e
1 file changed
+4
@@ -17,6 +17,9 @@ const ICON_SIZE: f32 = 22.0;
|
|||||||
const BTN_SIZE: f32 = 38.0;
|
const BTN_SIZE: f32 = 38.0;
|
||||||
/// Gap between the toolbar and the right edge of the canvas.
|
/// Gap between the toolbar and the right edge of the canvas.
|
||||||
const EDGE_MARGIN: f32 = 8.0;
|
const EDGE_MARGIN: f32 = 8.0;
|
||||||
|
/// Room kept free at the top right for the view cube and the UCS list; the
|
||||||
|
/// toolbar is centred in the height below it.
|
||||||
|
const TOP_RESERVE: f32 = 200.0;
|
||||||
|
|
||||||
fn icon_el(icon: IconKind) -> Element<'static, Message> {
|
fn icon_el(icon: IconKind) -> Element<'static, Message> {
|
||||||
match icon {
|
match icon {
|
||||||
@@ -122,6 +125,7 @@ pub fn view_with_active(
|
|||||||
.align_y(iced::Center)
|
.align_y(iced::Center)
|
||||||
.padding(iced::Padding {
|
.padding(iced::Padding {
|
||||||
right: EDGE_MARGIN,
|
right: EDGE_MARGIN,
|
||||||
|
top: TOP_RESERVE,
|
||||||
..iced::Padding::ZERO
|
..iced::Padding::ZERO
|
||||||
})
|
})
|
||||||
.into(),
|
.into(),
|
||||||
|
|||||||
Reference in new issue
Block a user