Rename PropertyHolder to LayoutHolder

This commit is contained in:
Keavon Chambers
2023-08-01 00:46:30 -07:00
parent 8e87e42f3e
commit b9e49623a3
51 changed files with 280 additions and 284 deletions
@@ -7,8 +7,8 @@ pub struct AboutGraphiteDialog {
pub localized_commit_date: String,
}
impl PropertyHolder for AboutGraphiteDialog {
fn properties(&self) -> Layout {
impl LayoutHolder for AboutGraphiteDialog {
fn layout(&self) -> Layout {
let links = [
("Website", "https://graphite.rs"),
("Credits", "https://github.com/GraphiteEditor/Graphite/graphs/contributors"),
@@ -4,8 +4,8 @@ use crate::messages::prelude::*;
/// A dialog for confirming the closing of all documents viewable via `file -> close all` in the menu bar.
pub struct CloseAllDocumentsDialog;
impl PropertyHolder for CloseAllDocumentsDialog {
fn properties(&self) -> Layout {
impl LayoutHolder for CloseAllDocumentsDialog {
fn layout(&self) -> Layout {
let discard = TextButton::new("Discard All")
.min_width(96)
.on_update(|_| {
@@ -8,8 +8,8 @@ pub struct CloseDocumentDialog {
pub document_id: u64,
}
impl PropertyHolder for CloseDocumentDialog {
fn properties(&self) -> Layout {
impl LayoutHolder for CloseDocumentDialog {
fn layout(&self) -> Layout {
let document_id = self.document_id;
let button_widgets = vec![
@@ -8,8 +8,8 @@ pub struct ComingSoonDialog {
pub issue: Option<i32>,
}
impl PropertyHolder for ComingSoonDialog {
fn properties(&self) -> Layout {
impl LayoutHolder for ComingSoonDialog {
fn layout(&self) -> Layout {
let mut details = "This feature is not implemented yet".to_string();
let mut buttons = vec![TextButton::new("OK")
@@ -7,8 +7,8 @@ pub struct ErrorDialog {
pub description: String,
}
impl PropertyHolder for ErrorDialog {
fn properties(&self) -> Layout {
impl LayoutHolder for ErrorDialog {
fn layout(&self) -> Layout {
Layout::WidgetLayout(WidgetLayout::new(vec![
LayoutGroup::Row {
widgets: vec![TextLabel::new(&self.title).bold(true).widget_holder()],