Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
90d96fc
【AL-82】Fix the error of assembly ui view
hananiahhsu Feb 18, 2026
dc16334
【AL-82】Fix the error of assembly ui view
hananiahhsu Feb 18, 2026
c01d4f1
【AL-82】Add sketch workbench and fix the error of drawing workbench
hananiahhsu Feb 19, 2026
5b94059
【AL-82】Add left common icons of ribbon area
hananiahhsu Feb 19, 2026
3479a7a
【AL-82】Fix the problem of blank left navigator for sketch workbench
hananiahhsu Feb 19, 2026
78ad58d
Merge remote-tracking branch 'remotes/origin/main' into Development_H…
hananiahhsu Feb 19, 2026
7528faa
【Feature-01】Tune the background color of MDI Area #57
hananiahhsu Feb 19, 2026
c5a50ba
【Feature-02】Improve the design of upper-left corner brand button
hananiahhsu Feb 20, 2026
3d46db6
【Bug-07】When draging the spliter between left nav panel and mdi area …
hananiahhsu Feb 20, 2026
16dc1b1
【Feature-03】Improve the quality of new file dialog such as focus, log…
hananiahhsu Feb 20, 2026
a096c24
【Feature-03】Improve the quality of new file dialog such as focus, log…
hananiahhsu Feb 21, 2026
e0bc8aa
【AL-91】Add logo for file menus
hananiahhsu Feb 21, 2026
30812da
【Feature-05】Theme support for platform and product layer #61
hananiahhsu Feb 21, 2026
fa9c570
【Feature-11】Connect and implement all commands in FILE MENU #68
hananiahhsu Feb 22, 2026
6cf7aba
【Bug-08】The whole ui interface becomes blank, then ribbon,nav,mdi app…
hananiahhsu Feb 22, 2026
9ee2b5c
【Bug-11】Failed to switch to home workbench after closing the last vie…
hananiahhsu Feb 22, 2026
d907149
【Bug-10】When creating a new file, NAV area and MDI area still first b…
hananiahhsu Feb 23, 2026
6ec5cc5
【Bug-10】When creating a new file, NAV area and MDI area still first b…
hananiahhsu Feb 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Alice
Submodule Alice updated from fc5f51 to fe6137
37 changes: 30 additions & 7 deletions Designer/Data/FunctionAreaConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
workbench="workbench.assembly"
defaultTab="tab_asm_home"/>

<ribbon id="sd.drawing"
label="SD - Drawing"
workbench="workbench.drawing"
defaultTab="tab_drawing_home"/>

<ribbon id="sd.home"
label="SD - Home"
workbench="workbench.home"
Expand Down Expand Up @@ -529,6 +534,25 @@
</tab>

</layout>


<!-- ===================== Drawing environment ===================== -->
<layout ribbon="sd.drawing">

<tab id="tab_drawing_home" label="Drawing" order="10">
<group id="grp_drawing_data" label="Data" order="10">
<control type="large-button" commandRef="file.new" row="0" column="0" rowSpan="3"/>
<control type="large-button" commandRef="file.open" row="0" column="1" rowSpan="3"/>
</group>

<group id="grp_drawing_view" label="View" order="20">
<control type="small-button" commandRef="view.front" row="0" column="0"/>
<control type="small-button" commandRef="view.right" row="1" column="0"/>
<control type="small-button" commandRef="view.top" row="2" column="0"/>
<control type="small-button" commandRef="view.trimetric" row="0" column="1"/>
</group>
</tab>
</layout>
<!-- ===================== Sketch environment ===================== -->
<layout ribbon="sd.sketch">

Expand Down Expand Up @@ -585,10 +609,6 @@
<control type="small-button" commandRef="datum.geometry.cs" row="2" column="0" />
</group>

<group id="grp_sketch_construction_mode" label="Construction Mode" order="45">
<control type="large-button" commandRef="sketch.constructionMode" row="0" column="0" rowSpan="3" />
</group>

<group id="grp_sketch_sketching" label="Sketching" order="50">
<SplitButton type="small-button" commandRef="sketch.line" row="0" column="0">
<SubMenu type="command" commandRef="sketch.line" />
Expand Down Expand Up @@ -649,12 +669,15 @@
<control type="small-button" commandRef="sketch.modify.offset" row="0" column="3" />
<control type="small-button" commandRef="sketch.thicken" row="1" column="3" />
<control type="small-button" commandRef="sketch.project" row="2" column="3" />

<control type="small-button" commandRef="sketch.construction.centerline" row="0" column="4"/>
<control type="small-button" commandRef="sketch.construction.point" row="1" column="4" />
<control type="small-button" commandRef="sketch.constrcution.cs" row="2" column="4" />

<control type="large-button" commandRef="sketch.palette" row="0" column="5" rowSpan="3" />

<LauncherMenu>
<SubMenu type="command" commandRef="sketch.constructionMode" />
<SubMenu type="command" commandRef="sketch.palette" />
</LauncherMenu>
</group>

<group id="grp_sketch_editing" label="Editing" order="60">
Expand Down
355 changes: 261 additions & 94 deletions Designer/Data/IconLibraryConfig.xml

Large diffs are not rendered by default.

28 changes: 21 additions & 7 deletions Designer/Data/TitleBarConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
id="app"
commandRef="ui.appMenu"
order="5"
iconRef="app"
iconRef="app_wordmark"
iconSize="100,28"
fixedSize="110,30"
tooltip="SolidDesigner"/>

<!-- QAT: new/open/save/undo/redo/regenerate/windows/dropdown -->
Expand Down Expand Up @@ -153,7 +155,9 @@
id="app"
commandRef="ui.appMenu"
order="5"
iconRef="app"
iconRef="app_wordmark"
iconSize="100,28"
fixedSize="110,30"
tooltip="SolidDesigner"/>

<control type="command-button"
Expand Down Expand Up @@ -242,7 +246,9 @@
id="app"
commandRef="ui.appMenu"
order="5"
icon=":/TitleBar/brand/app.svg"
iconRef="app_wordmark"
iconSize="100,28"
fixedSize="110,30"
tooltip="SolidDesigner"/>

<control type="command-button"
Expand Down Expand Up @@ -323,7 +329,9 @@
<control type="brand-button"
id="app"
commandRef="ui.appMenu"
iconRef="app"
iconRef="app_wordmark"
iconSize="100,28"
fixedSize="110,30"
order="5"
tooltip="SolidDesigner"/>

Expand Down Expand Up @@ -405,7 +413,9 @@
<control type="brand-button"
id="app"
commandRef="ui.appMenu"
iconRef="app"
iconRef="app_wordmark"
iconSize="100,28"
fixedSize="110,30"
order="5"
tooltip="SolidDesigner"/>

Expand Down Expand Up @@ -485,7 +495,9 @@
<control type="brand-button"
id="app"
commandRef="ui.appMenu"
iconRef="app"
iconRef="app_wordmark"
iconSize="100,28"
fixedSize="110,30"
order="5"
tooltip="SolidDesigner"/>

Expand Down Expand Up @@ -567,7 +579,9 @@
<control type="brand-button"
id="app"
commandRef="ui.appMenu"
iconRef="app"
iconRef="app_wordmark"
iconSize="100,28"
fixedSize="110,30"
order="5"
tooltip="SolidDesigner"/>

Expand Down
26 changes: 23 additions & 3 deletions Designer/Data/WorkBenchConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@
</LayoutProfiles>
</Workbench>

<Workbench id="workbench.sketch" displayName="Sketch" uiContext="ctx.sketch">
<AppliesTo>
<DocumentType id="doc.sketch"/>
</AppliesTo>

<DockPanels>
<Panel id="panel.modeltree"/>
<Panel id="panel.properties"/>
<Panel id="panel.codeEditor"/>
</DockPanels>

<InitialViews>
<ViewKind id="view.sketch2d"/>
</InitialViews>

<LayoutProfiles>
<Layout id="default" isDefault="true"/>
</LayoutProfiles>
</Workbench>

<Workbench id="workbench.assembly" displayName="Assembly" uiContext="ctx.assembly">
<AppliesTo>
<DocumentType id="doc.assembly"/>
Expand All @@ -71,7 +91,7 @@
<Panel id="panel.properties"/>
</DockPanels>
<InitialViews>
<ViewKind id="view.asm3d"/>
<ViewKind id="view.model3d"/>
</InitialViews>
<LayoutProfiles>
<Layout id="default" isDefault="true"/>
Expand All @@ -88,7 +108,7 @@
<Panel id="panel.codeEditor"/>
</DockPanels>
<InitialViews>
<ViewKind id="view.drawing"/>
<ViewKind id="view.drawing.sheet"/>
</InitialViews>
<LayoutProfiles>
<Layout id="default" isDefault="true"/>
Expand All @@ -104,7 +124,7 @@
<Panel id="panel.properties"/>
</DockPanels>
<InitialViews>
<ViewKind id="view.bim"/>
<ViewKind id="view.bim.plan"/>
</InitialViews>
<LayoutProfiles>
<Layout id="default" isDefault="true"/>
Expand Down
6 changes: 4 additions & 2 deletions Designer/Data/WorkBenchPreference.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
"preferredWorkbenchByDocType":
{
"doc.part": "workbench.part",
"doc.sketch": "workbench.sketch",
"doc.assembly": "workbench.assembly",
"doc.drawing": "workbench.drawing",
"doc.none": "workbench.home"
},
"workbenchSwitcher":
{
"orderedIds": ["workbench.home","workbench.part","workbench.assembly","workbench.drawing"],
"orderedIds": ["workbench.home","workbench.part","workbench.sketch","workbench.assembly","workbench.drawing"],
"hiddenIds": [],
"pinnedIds": ["workbench.part","workbench.assembly"],
"pinnedIds": ["workbench.part","workbench.sketch","workbench.assembly"],
"showIcons": true,
"showText": true
},
Expand Down Expand Up @@ -51,6 +52,7 @@
"recentWorkbenches":
[
"workbench.part",
"workbench.sketch",
"workbench.assembly"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Owner: hananiah
#include "SolidFileCloseCommand.h"
#include "SolidDesignerCommands.h"
#include "AliceCommandParameter.h"
#include "AliceCoreAppUtil.h"
#include "AliceISession.h"
#include "AliceIDocument.h"
#include "AliceIUiApplicationFactory.h"
#include "AliceIUiApplication.h"
#include "AliceIMainWindow.h"
#include "AliceIOperation.h"

using namespace alice;
using namespace sdr;

SolidFileCloseCommand::SolidFileCloseCommand() noexcept
: AppCommandBase(std::string(Cmd::FILE_CLOSE))
{
}

SolidFileCloseCommand::~SolidFileCloseCommand() = default;

bool SolidFileCloseCommand::IsSupported() const
{
ISession* session = CoreAppUtil::GetCurrentSession();
if (!session)
return false;
IUiApplicationFactory* pAppFactory = IUiApplicationFactory::Get();
if (!pAppFactory)
return false;
IUiApplication* pApp = pAppFactory->GetUiApplication();
if (!pApp)
return false;
return pApp->GetMainWindow() != nullptr;
}

bool SolidFileCloseCommand::IsVisible() const
{
return IsSupported();
}

bool SolidFileCloseCommand::IsEnabled() const
{
if (!IsSupported())
return false;
ISession* session = CoreAppUtil::GetCurrentSession();
return session && session->GetActiveDocument();
}

std::string SolidFileCloseCommand::DisabledReason() const
{
ISession* session = CoreAppUtil::GetCurrentSession();
if (!session)
return "Session is not available.";
if (!session->GetActiveDocument())
return "There is no active document.";
return {};
}

std::unique_ptr<IOperation> SolidFileCloseCommand::Execute(const CommandParameter& /*param*/)
{
if (!IsSupported())
return nullptr;

IUiApplicationFactory* pAppFactory = IUiApplicationFactory::Get();
IUiApplication* pApp = pAppFactory ? pAppFactory->GetUiApplication() : nullptr;
IMainWindow* pMainWindow = pApp ? pApp->GetMainWindowFw() : nullptr;
if (!pMainWindow)
return nullptr;

pMainWindow->CloseCurrentView();
return nullptr;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once

#include "BaseCommands/SolidBaseCommand.h"

namespace alice
{
struct CommandParameter;
class IOperation;
}

namespace sdr
{
/// \brief Implements "file.close" for the active document view.
class SolidFileCloseCommand final : public AppCommandBase
{
public:
SolidFileCloseCommand() noexcept;
~SolidFileCloseCommand() override;

bool IsSupported() const override;
bool IsVisible() const override;
bool IsEnabled() const override;
std::string DisabledReason() const override;

std::unique_ptr<alice::IOperation> Execute(const alice::CommandParameter& param) override;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include "SolidFileExitCommand.h"
#include "SolidDesignerCommands.h"
#include "AliceCommandParameter.h"
#include <QCoreApplication>
#include "AliceIOperation.h"

using namespace sdr;

SolidFileExitCommand::SolidFileExitCommand() noexcept
: AppCommandBase(std::string(Cmd::FILE_EXIT))
{
}

SolidFileExitCommand::~SolidFileExitCommand() = default;

bool SolidFileExitCommand::IsSupported() const
{
return true;
}

bool SolidFileExitCommand::IsVisible() const
{
return true;
}

bool SolidFileExitCommand::IsEnabled() const
{
return true;
}

std::string SolidFileExitCommand::DisabledReason() const
{
return {};
}

std::unique_ptr<alice::IOperation> SolidFileExitCommand::Execute(const alice::CommandParameter& /*param*/)
{
QCoreApplication::quit();
return nullptr;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#pragma once

#include "BaseCommands/SolidBaseCommand.h"

namespace alice { struct CommandParameter; class IOperation; }

namespace sdr
{
/// \brief Implements "file.exit".
class SolidFileExitCommand final : public AppCommandBase
{
public:
SolidFileExitCommand() noexcept;
~SolidFileExitCommand() override;

bool IsSupported() const override;
bool IsVisible() const override;
bool IsEnabled() const override;
std::string DisabledReason() const override;

std::unique_ptr<alice::IOperation> Execute(const alice::CommandParameter& param) override;
};
}
Loading