mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 15:38:12 +08:00
Add suffix widget non-rounding; add disabled state to many widgets
This commit is contained in:
@@ -9,6 +9,8 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct PivotAssist {
|
||||
pub position: PivotPosition,
|
||||
|
||||
pub disabled: bool,
|
||||
|
||||
// Callbacks
|
||||
#[serde(skip)]
|
||||
#[derivative(Debug = "ignore", PartialEq = "ignore")]
|
||||
|
||||
@@ -11,6 +11,8 @@ pub struct IconButton {
|
||||
|
||||
pub size: u32, // TODO: Convert to an `IconSize` enum
|
||||
|
||||
pub disabled: bool,
|
||||
|
||||
pub active: bool,
|
||||
|
||||
pub tooltip: String,
|
||||
@@ -29,9 +31,12 @@ pub struct IconButton {
|
||||
pub struct PopoverButton {
|
||||
pub icon: Option<String>,
|
||||
|
||||
// Body
|
||||
pub disabled: bool,
|
||||
|
||||
// Placeholder popover content heading
|
||||
pub header: String,
|
||||
|
||||
// Placeholder popover content paragraph
|
||||
pub text: String,
|
||||
|
||||
pub tooltip: String,
|
||||
|
||||
@@ -238,6 +238,8 @@ pub struct OptionalInput {
|
||||
pub struct RadioInput {
|
||||
pub entries: Vec<RadioEntryData>,
|
||||
|
||||
pub disabled: bool,
|
||||
|
||||
// This uses `u32` instead of `usize` since it will be serialized as a normal JS number (replace this with `usize` after switching to a Rust-based GUI)
|
||||
#[serde(rename = "selectedIndex")]
|
||||
pub selected_index: u32,
|
||||
|
||||
@@ -5,6 +5,8 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct IconLabel {
|
||||
pub icon: String,
|
||||
|
||||
pub disabled: bool,
|
||||
|
||||
pub tooltip: String,
|
||||
}
|
||||
|
||||
@@ -32,6 +34,8 @@ pub enum SeparatorType {
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Derivative, Debug, PartialEq, Eq, Default)]
|
||||
pub struct TextLabel {
|
||||
pub disabled: bool,
|
||||
|
||||
pub bold: bool,
|
||||
|
||||
pub italic: bool,
|
||||
|
||||
Reference in New Issue
Block a user