mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 01:28:12 +08:00
Prep for the RC1 release of the desktop app
This commit is contained in:
@@ -18,25 +18,19 @@ impl DialogLayoutHolder for LicensesDialog {
|
||||
fn layout_column_2(&self) -> Layout {
|
||||
#[allow(clippy::type_complexity)]
|
||||
let button_definitions: &[(&str, &str, fn() -> Message)] = &[
|
||||
("GraphiteLogo", "Graphite Logo", || {
|
||||
("Code", "Source Code License", || {
|
||||
FrontendMessage::TriggerVisitLink {
|
||||
url: "https://graphite.art/logo/".into(),
|
||||
url: "https://graphite.art/license#source-code".into(),
|
||||
}
|
||||
.into()
|
||||
}),
|
||||
("IconsGrid", "Graphite Icons", || {
|
||||
("GraphiteLogo", "Branding License", || {
|
||||
FrontendMessage::TriggerVisitLink {
|
||||
url: "https://raw.githubusercontent.com/GraphiteEditor/Graphite/master/frontend/assets/LICENSE.md".into(),
|
||||
url: "https://graphite.art/license#branding".into(),
|
||||
}
|
||||
.into()
|
||||
}),
|
||||
("License", "Graphite License", || {
|
||||
FrontendMessage::TriggerVisitLink {
|
||||
url: "https://graphite.art/license/".into(),
|
||||
}
|
||||
.into()
|
||||
}),
|
||||
("License", "Other Licenses", || FrontendMessage::TriggerDisplayThirdPartyLicensesDialog.into()),
|
||||
("IconsGrid", "Dependency Licenses", || FrontendMessage::TriggerDisplayThirdPartyLicensesDialog.into()),
|
||||
];
|
||||
let widgets = button_definitions
|
||||
.iter()
|
||||
@@ -52,13 +46,11 @@ impl LayoutHolder for LicensesDialog {
|
||||
let year = &self.localized_commit_year;
|
||||
let description = format!(
|
||||
"
|
||||
The Graphite logo and brand identity are copyright © {year}\nGraphite Labs, LLC. See \"Graphite Logo\" for usage policy.\n\
|
||||
Graphite source code is copyright © {year} Graphite contrib-\nutors and is available under the Apache License 2.0. See\n\"Source Code License\" for details.\n\
|
||||
\n\
|
||||
The Graphite editor's icons and design assets are copyright\n© {year} Graphite Labs, LLC. See \"Graphite Icons\" for details.\n\
|
||||
The Graphite logo, icons, and visual identity are copyright ©\n{year} Graphite Labs, LLC. See \"Branding License\" for details.\n\
|
||||
\n\
|
||||
Graphite code is copyright © {year} Graphite contributors\nand is made available under the Apache 2.0 license. See\n\"Graphite License\" for details.\n\
|
||||
\n\
|
||||
Graphite is distributed with third-party open source code\ndependencies. See \"Other Licenses\" for details.
|
||||
Graphite is distributed with third-party open source code\ndependencies. See \"Dependency Licenses\" for details.
|
||||
"
|
||||
);
|
||||
let description = description.trim();
|
||||
|
||||
@@ -327,6 +327,9 @@ pub enum FrontendMessage {
|
||||
UpdateStatusBarHintsLayout {
|
||||
diff: Vec<WidgetDiff>,
|
||||
},
|
||||
UpdateStatusBarInfoLayout {
|
||||
diff: Vec<WidgetDiff>,
|
||||
},
|
||||
UpdateWorkingColorsLayout {
|
||||
diff: Vec<WidgetDiff>,
|
||||
},
|
||||
|
||||
@@ -481,6 +481,7 @@ impl LayoutMessageHandler {
|
||||
LayoutTarget::NodeGraphControlBar => FrontendMessage::UpdateNodeGraphControlBarLayout { diff },
|
||||
LayoutTarget::PropertiesPanel => FrontendMessage::UpdatePropertiesPanelLayout { diff },
|
||||
LayoutTarget::StatusBarHints => FrontendMessage::UpdateStatusBarHintsLayout { diff },
|
||||
LayoutTarget::StatusBarInfo => FrontendMessage::UpdateStatusBarInfoLayout { diff },
|
||||
LayoutTarget::ToolOptions => FrontendMessage::UpdateToolOptionsLayout { diff },
|
||||
LayoutTarget::ToolShelf => FrontendMessage::UpdateToolShelfLayout { diff },
|
||||
LayoutTarget::WelcomeScreenButtons => FrontendMessage::UpdateWelcomeScreenButtonsLayout { diff },
|
||||
|
||||
@@ -46,6 +46,8 @@ pub enum LayoutTarget {
|
||||
PropertiesPanel,
|
||||
/// The contextual input key/mouse combination shortcuts shown in the status bar at the bottom of the window.
|
||||
StatusBarHints,
|
||||
/// The version information shown in the status bar at the bottom right of the window.
|
||||
StatusBarInfo,
|
||||
/// The left side of the control bar directly above the canvas.
|
||||
ToolOptions,
|
||||
/// The vertical buttons for all of the tools on the left of the canvas.
|
||||
|
||||
@@ -111,6 +111,7 @@ pub enum PortfolioMessage {
|
||||
},
|
||||
PrevDocument,
|
||||
RequestWelcomeScreenButtonsLayout,
|
||||
RequestStatusBarInfoLayout,
|
||||
SetActivePanel {
|
||||
panel: PanelType,
|
||||
},
|
||||
|
||||
@@ -131,6 +131,9 @@ impl MessageHandler<PortfolioMessage, PortfolioMessageContext<'_>> for Portfolio
|
||||
// Before loading any documents, initially prepare the welcome screen buttons layout
|
||||
responses.add(PortfolioMessage::RequestWelcomeScreenButtonsLayout);
|
||||
|
||||
// Request status bar info layout
|
||||
responses.add(PortfolioMessage::RequestStatusBarInfoLayout);
|
||||
|
||||
// Tell frontend to finish loading persistent documents
|
||||
responses.add(FrontendMessage::TriggerLoadRestAutoSaveDocuments);
|
||||
|
||||
@@ -950,6 +953,16 @@ impl MessageHandler<PortfolioMessage, PortfolioMessageContext<'_>> for Portfolio
|
||||
layout_target: LayoutTarget::WelcomeScreenButtons,
|
||||
});
|
||||
}
|
||||
PortfolioMessage::RequestStatusBarInfoLayout => {
|
||||
let row = LayoutGroup::Row {
|
||||
widgets: vec![TextLabel::new("Graphite (beta) 1.0.0-RC1").disabled(true).widget_instance()],
|
||||
};
|
||||
|
||||
responses.add(LayoutMessage::SendLayout {
|
||||
layout: Layout(vec![row]),
|
||||
layout_target: LayoutTarget::StatusBarInfo,
|
||||
});
|
||||
}
|
||||
PortfolioMessage::SetActivePanel { panel } => {
|
||||
self.active_panel = panel;
|
||||
responses.add(DocumentMessage::SetActivePanel { active_panel: self.active_panel });
|
||||
|
||||
Reference in New Issue
Block a user