forked from 1b-agent/opencadstudio-upstream
refactor: group ui/ style+popup dirs, rename cmd_result driver
- Group the flat src/ui/ dir: move the 9 style editors into ui/style/ (dimstyle, mleaderstyle, mlstyle, plotstyle, textstyle, tablestyle, point_style, style_list, style_manager) and the 6 popups into ui/popup/ (cycle, isolate, scale, selection_filter, snap, units). Call sites repointed to crate::ui::style::/crate::ui::popup::; no compat re-exports. ui/ root drops from 36 to 21 files. - Rename app/cmd_result.rs -> app/command_driver.rs: the file is the StepInput->feed_command driver, not the CmdResult type (which lives in command.rs). Name now matches contents. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
7cb666801f
commit
9cd0479047
24 files changed
+40
-38
No files matched your search
+2
-15
@@ -6,37 +6,24 @@ pub mod about;
|
||||
pub mod app_menu;
|
||||
pub mod color_select;
|
||||
pub mod command_line;
|
||||
pub mod cycle_popup;
|
||||
pub mod dimstyle;
|
||||
pub mod icons;
|
||||
pub mod isolate_popup;
|
||||
pub mod layers;
|
||||
pub mod layout_manager;
|
||||
pub mod mleaderstyle;
|
||||
pub mod mlstyle;
|
||||
pub mod modal;
|
||||
pub mod open_progress;
|
||||
pub mod overlay;
|
||||
pub mod page_setup;
|
||||
pub mod plotstyle;
|
||||
pub mod plugin_manager;
|
||||
pub mod point_style;
|
||||
pub mod popup;
|
||||
pub mod properties;
|
||||
pub mod ribbon;
|
||||
pub mod scale_popup;
|
||||
pub mod selection_filter_popup;
|
||||
pub mod side_toolbar;
|
||||
pub mod shortcuts;
|
||||
pub mod snap_popup;
|
||||
pub mod statusbar;
|
||||
pub mod statusbar_config;
|
||||
pub mod statusbar_menu;
|
||||
pub mod style_list;
|
||||
pub mod style_manager;
|
||||
pub mod tablestyle;
|
||||
pub mod style;
|
||||
pub mod text_util;
|
||||
pub mod textstyle;
|
||||
pub mod units_popup;
|
||||
pub mod update_notice;
|
||||
|
||||
pub use app_menu::AppMenu;
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,6 @@
|
||||
pub mod cycle_popup;
|
||||
pub mod isolate_popup;
|
||||
pub mod scale_popup;
|
||||
pub mod selection_filter_popup;
|
||||
pub mod snap_popup;
|
||||
pub mod units_popup;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -167,7 +167,7 @@ impl StatusBar {
|
||||
if vis(StatusPill::Units) {
|
||||
right_status = right_status.push(tip(
|
||||
units_btn(
|
||||
crate::ui::units_popup::unit_short(insertion_units),
|
||||
crate::ui::popup::units_popup::unit_short(insertion_units),
|
||||
units_popup_open,
|
||||
),
|
||||
"Drawing Units (INSUNITS)\nClick to change",
|
||||
|
||||
@@ -792,7 +792,7 @@ pub fn view_window<'a>(
|
||||
left: 0.0,
|
||||
});
|
||||
|
||||
crate::ui::style_manager::view(crate::ui::style_manager::Scaffold {
|
||||
crate::ui::style::style_manager::view(crate::ui::style::style_manager::Scaffold {
|
||||
kind: crate::app::StyleKind::Dim,
|
||||
styles: &styles,
|
||||
selected,
|
||||
@@ -413,7 +413,7 @@ pub fn view_window<'a>(v: MLeaderStyleView<'a>) -> Element<'a, Message> {
|
||||
|
||||
let right_panel = container(details).width(Fill).height(Fill);
|
||||
|
||||
crate::ui::style_manager::view(crate::ui::style_manager::Scaffold {
|
||||
crate::ui::style::style_manager::view(crate::ui::style::style_manager::Scaffold {
|
||||
kind: crate::app::StyleKind::MLeader,
|
||||
styles: &v.styles,
|
||||
selected: v.selected,
|
||||
@@ -79,7 +79,7 @@ pub fn view_window<'a>(
|
||||
|
||||
let right_panel = container(details).width(Fill).height(Fill);
|
||||
|
||||
crate::ui::style_manager::view(crate::ui::style_manager::Scaffold {
|
||||
crate::ui::style::style_manager::view(crate::ui::style::style_manager::Scaffold {
|
||||
kind: crate::app::StyleKind::MLine,
|
||||
styles: &styles,
|
||||
selected,
|
||||
@@ -0,0 +1,9 @@
|
||||
pub mod dimstyle;
|
||||
pub mod mleaderstyle;
|
||||
pub mod mlstyle;
|
||||
pub mod plotstyle;
|
||||
pub mod textstyle;
|
||||
pub mod tablestyle;
|
||||
pub mod point_style;
|
||||
pub mod style_list;
|
||||
pub mod style_manager;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -115,7 +115,7 @@ pub fn view<'a, 'b>(s: Scaffold<'a, 'b>) -> Element<'a, Message> {
|
||||
.map(|name| {
|
||||
let is_sel = name.as_str() == s.selected;
|
||||
let is_current = s.current == Some(name.as_str());
|
||||
crate::ui::style_list::item(
|
||||
crate::ui::style::style_list::item(
|
||||
name,
|
||||
is_current,
|
||||
is_sel,
|
||||
@@ -369,7 +369,7 @@ pub fn view_window<'a>(
|
||||
|
||||
let right_panel = container(details).width(Fill).height(Fill);
|
||||
|
||||
crate::ui::style_manager::view(crate::ui::style_manager::Scaffold {
|
||||
crate::ui::style::style_manager::view(crate::ui::style::style_manager::Scaffold {
|
||||
kind: crate::app::StyleKind::Table,
|
||||
styles: &styles,
|
||||
selected,
|
||||
@@ -306,7 +306,7 @@ pub fn view_window<'a>(v: TextStyleView<'a>) -> Element<'a, Message> {
|
||||
|
||||
let editor = row![font_panel, vsep(), ttf_panel, vsep(), props_panel].height(Fill);
|
||||
|
||||
crate::ui::style_manager::view(crate::ui::style_manager::Scaffold {
|
||||
crate::ui::style::style_manager::view(crate::ui::style::style_manager::Scaffold {
|
||||
kind: StyleKind::Text,
|
||||
styles: &styles,
|
||||
selected,
|
||||
Reference in new issue
Block a user