* Implement initial structs from spec * kdl configuration unmarshalling * typo text styling * remove is_selected toggle * incorporate new status bar ui into theming * improve test coverage of config behavior * tab bar correction * correct also compact bar * remove spacing between table columns * refactor table styling * use text_unselected.emphasis_1 for keygroup sep * fix tab bar more text * repair field flattening for theme * remove extra styling KDL node * update tests * updated selected text conversion * padding for header bar * minor corrections for existing themes * background handling * compact bar corrections * properly handle opaque method to activate background * update newer plugins to use styling struct * correct omission of selected state * fix: bold typeface for text elements * fix: fg -> white for list_unselected conversion * fix: emphasis and opacity handling for nested_list * correct stylings in the session-manager * fix emphases translation for table component * correct emphasis for run instructions * correct frame_highlight translation for old themes * provide missing implementation of frame_highlight * fencepost emphasis color names * Set a pseudo-None for frame_unselected in old theme conversion * correct alternating bg for simplified-ui * update snapshots * fix inner text padding and errorneous snapshots * suppress warning about deprecated usage of palette * remove unused import * feat(plugins): API to change floating pane coordinates (#3958) * basic functionality through the cli * added to plugin api * add display area and viewport size to TabInfo * fix tests and add new one * some cleanups * refactor: extract pane_id parsing logic * style(fmt): rustfmt * docs(changelog): floating pane coordinate chagne API * fix(tiled-panes): opening panes from the cli (#3963) * feat(plugins): add `PastedText` Event (#3962) * working with text paste * handle utf8 conversion error * feat(plugins): add PastedText Event * docs(changelog): plugins pasted text event * black for table opaque background * properly apply opacity to table * correct padding for explicit width ribbons * feat(plugins): Allow opening panes near plugin (#3966) * added command + terminal variants * added editor variant * style(fmt): rustfmt * docs(changelog): plugin apis to open panes near plugin * feat(plugins): send info about $EDITOR and $SHELL (#3971) * feat(plugins): send info about $EDITOR and $SHELL * fix(e2e): snapshot update * docs(changelog): plugin editor and shell info * fix(floating-panes): when changing coordinates, if a pane is not floating - make it floating (#3972) * fix(panes): when changing floating pane coordinates, if the pane is not floating, float it * style(fmt): rustfmt * docs(changelog): floating pane coordinate fix * fix(break-pane): strip logical position when inserting pane to new tab (#3973) * docs(changelog): logical position fix * Optional frame_unselected theme * fixture with correct width to account for arrow padding * update snapshot and rustfmt --------- Co-authored-by: Aram Drevekenin <aram@poor.dev>
168 lines
6.3 KiB
Rust
168 lines
6.3 KiB
Rust
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
pub struct Style {
|
|
#[deprecated]
|
|
#[prost(message, optional, tag = "1")]
|
|
pub palette: ::core::option::Option<Palette>,
|
|
#[prost(bool, tag = "2")]
|
|
pub rounded_corners: bool,
|
|
#[prost(bool, tag = "3")]
|
|
pub hide_session_name: bool,
|
|
#[prost(message, optional, tag = "4")]
|
|
pub styling: ::core::option::Option<Styling>,
|
|
}
|
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
pub struct Palette {
|
|
#[prost(enumeration = "ThemeHue", tag = "1")]
|
|
pub theme_hue: i32,
|
|
#[prost(message, optional, tag = "2")]
|
|
pub fg: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "3")]
|
|
pub bg: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "4")]
|
|
pub black: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "5")]
|
|
pub red: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "6")]
|
|
pub green: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "7")]
|
|
pub yellow: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "8")]
|
|
pub blue: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "9")]
|
|
pub magenta: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "10")]
|
|
pub cyan: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "11")]
|
|
pub white: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "12")]
|
|
pub orange: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "13")]
|
|
pub gray: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "14")]
|
|
pub purple: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "15")]
|
|
pub gold: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "16")]
|
|
pub silver: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "17")]
|
|
pub pink: ::core::option::Option<Color>,
|
|
#[prost(message, optional, tag = "18")]
|
|
pub brown: ::core::option::Option<Color>,
|
|
}
|
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
pub struct Color {
|
|
#[prost(enumeration = "ColorType", tag = "1")]
|
|
pub color_type: i32,
|
|
#[prost(oneof = "color::Payload", tags = "2, 3")]
|
|
pub payload: ::core::option::Option<color::Payload>,
|
|
}
|
|
/// Nested message and enum types in `Color`.
|
|
pub mod color {
|
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
pub enum Payload {
|
|
#[prost(message, tag = "2")]
|
|
RgbColorPayload(super::RgbColorPayload),
|
|
#[prost(uint32, tag = "3")]
|
|
EightBitColorPayload(u32),
|
|
}
|
|
}
|
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
pub struct RgbColorPayload {
|
|
#[prost(uint32, tag = "1")]
|
|
pub red: u32,
|
|
#[prost(uint32, tag = "2")]
|
|
pub green: u32,
|
|
#[prost(uint32, tag = "3")]
|
|
pub blue: u32,
|
|
}
|
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
pub struct Styling {
|
|
#[prost(message, repeated, tag = "1")]
|
|
pub text_unselected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "2")]
|
|
pub text_selected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "3")]
|
|
pub ribbon_unselected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "4")]
|
|
pub ribbon_selected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "5")]
|
|
pub table_title: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "6")]
|
|
pub table_cell_unselected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "7")]
|
|
pub table_cell_selected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "8")]
|
|
pub list_unselected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "9")]
|
|
pub list_selected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "10")]
|
|
pub frame_unselected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "11")]
|
|
pub frame_selected: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "12")]
|
|
pub frame_highlight: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "13")]
|
|
pub exit_code_success: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "14")]
|
|
pub exit_code_error: ::prost::alloc::vec::Vec<Color>,
|
|
#[prost(message, repeated, tag = "15")]
|
|
pub multiplayer_user_colors: ::prost::alloc::vec::Vec<Color>,
|
|
}
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
|
#[repr(i32)]
|
|
pub enum ColorType {
|
|
Rgb = 0,
|
|
EightBit = 1,
|
|
}
|
|
impl ColorType {
|
|
/// String value of the enum field names used in the ProtoBuf definition.
|
|
///
|
|
/// The values are not transformed in any way and thus are considered stable
|
|
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
|
|
pub fn as_str_name(&self) -> &'static str {
|
|
match self {
|
|
ColorType::Rgb => "Rgb",
|
|
ColorType::EightBit => "EightBit",
|
|
}
|
|
}
|
|
/// Creates an enum from field names used in the ProtoBuf definition.
|
|
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
|
match value {
|
|
"Rgb" => Some(Self::Rgb),
|
|
"EightBit" => Some(Self::EightBit),
|
|
_ => None,
|
|
}
|
|
}
|
|
}
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
|
#[repr(i32)]
|
|
pub enum ThemeHue {
|
|
Dark = 0,
|
|
Light = 1,
|
|
}
|
|
impl ThemeHue {
|
|
/// String value of the enum field names used in the ProtoBuf definition.
|
|
///
|
|
/// The values are not transformed in any way and thus are considered stable
|
|
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
|
|
pub fn as_str_name(&self) -> &'static str {
|
|
match self {
|
|
ThemeHue::Dark => "Dark",
|
|
ThemeHue::Light => "Light",
|
|
}
|
|
}
|
|
/// Creates an enum from field names used in the ProtoBuf definition.
|
|
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
|
match value {
|
|
"Dark" => Some(Self::Dark),
|
|
"Light" => Some(Self::Light),
|
|
_ => None,
|
|
}
|
|
}
|
|
}
|