config: Add and propagate appearance_config
This commit is contained in:
parent
94d49210e6
commit
2adebb5fe1
10 changed files with 213 additions and 40 deletions
|
|
@ -49,6 +49,13 @@ pub enum NumlockState {
|
||||||
LastBoot,
|
LastBoot,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
|
||||||
|
pub struct AppearanceConfig {
|
||||||
|
pub clip_floating_windows: bool,
|
||||||
|
pub clip_tiled_windows: bool,
|
||||||
|
pub shadow_tiled_windows: bool,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, CosmicConfigEntry)]
|
#[derive(Clone, Debug, PartialEq, CosmicConfigEntry)]
|
||||||
#[version = 1]
|
#[version = 1]
|
||||||
pub struct CosmicCompConfig {
|
pub struct CosmicCompConfig {
|
||||||
|
|
@ -81,6 +88,7 @@ pub struct CosmicCompConfig {
|
||||||
/// The threshold before windows snap themselves to output edges
|
/// The threshold before windows snap themselves to output edges
|
||||||
pub edge_snap_threshold: u32,
|
pub edge_snap_threshold: u32,
|
||||||
pub accessibility_zoom: ZoomConfig,
|
pub accessibility_zoom: ZoomConfig,
|
||||||
|
pub appearance_settings: AppearanceConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for CosmicCompConfig {
|
impl Default for CosmicCompConfig {
|
||||||
|
|
@ -116,6 +124,7 @@ impl Default for CosmicCompConfig {
|
||||||
xwayland_eavesdropping: XwaylandEavesdropping::default(),
|
xwayland_eavesdropping: XwaylandEavesdropping::default(),
|
||||||
edge_snap_threshold: 0,
|
edge_snap_threshold: 0,
|
||||||
accessibility_zoom: ZoomConfig::default(),
|
accessibility_zoom: ZoomConfig::default(),
|
||||||
|
appearance_settings: AppearanceConfig::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ mod types;
|
||||||
use cosmic::config::CosmicTk;
|
use cosmic::config::CosmicTk;
|
||||||
pub use cosmic_comp_config::EdidProduct;
|
pub use cosmic_comp_config::EdidProduct;
|
||||||
use cosmic_comp_config::{
|
use cosmic_comp_config::{
|
||||||
CosmicCompConfig, KeyboardConfig, TileBehavior, XkbConfig, XwaylandDescaling,
|
AppearanceConfig, CosmicCompConfig, KeyboardConfig, TileBehavior, XkbConfig, XwaylandDescaling,
|
||||||
XwaylandEavesdropping, ZoomConfig,
|
XwaylandEavesdropping, ZoomConfig,
|
||||||
input::{DeviceState as InputDeviceState, InputConfig, TouchpadOverride},
|
input::{DeviceState as InputDeviceState, InputConfig, TouchpadOverride},
|
||||||
output::comp::{
|
output::comp::{
|
||||||
|
|
@ -942,6 +942,16 @@ fn config_changed(config: cosmic_config::Config, keys: Vec<String>, state: &mut
|
||||||
state.common.update_config();
|
state.common.update_config();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"appearance_settings" => {
|
||||||
|
let new = get_config::<AppearanceConfig>(&config, "appearance_settings");
|
||||||
|
if new != state.common.config.cosmic_conf.appearance_settings {
|
||||||
|
state.common.config.cosmic_conf.appearance_settings = new;
|
||||||
|
state.common.update_config();
|
||||||
|
for output in state.common.shell.read().outputs() {
|
||||||
|
state.backend.schedule_render(output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ use crate::{
|
||||||
utils::{iced::IcedElementInternal, prelude::*},
|
utils::{iced::IcedElementInternal, prelude::*},
|
||||||
};
|
};
|
||||||
use calloop::LoopHandle;
|
use calloop::LoopHandle;
|
||||||
|
use cosmic_comp_config::AppearanceConfig;
|
||||||
use id_tree::NodeId;
|
use id_tree::NodeId;
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
|
|
@ -500,13 +501,14 @@ impl CosmicMapped {
|
||||||
&mut self,
|
&mut self,
|
||||||
(output, overlap): (&Output, Rectangle<i32, Logical>),
|
(output, overlap): (&Output, Rectangle<i32, Logical>),
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
) {
|
) {
|
||||||
if let CosmicMappedInternal::Window(window) = &self.element {
|
if let CosmicMappedInternal::Window(window) = &self.element {
|
||||||
let surface = window.surface();
|
let surface = window.surface();
|
||||||
let activated = surface.is_activated(true);
|
let activated = surface.is_activated(true);
|
||||||
let handle = window.loop_handle();
|
let handle = window.loop_handle();
|
||||||
|
|
||||||
let stack = CosmicStack::new(std::iter::once(surface), handle, theme);
|
let stack = CosmicStack::new(std::iter::once(surface), handle, theme, appearance);
|
||||||
if let Some(geo) = *self.last_geometry.lock().unwrap() {
|
if let Some(geo) = *self.last_geometry.lock().unwrap() {
|
||||||
stack.set_geometry(geo.to_global(output));
|
stack.set_geometry(geo.to_global(output));
|
||||||
}
|
}
|
||||||
|
|
@ -524,11 +526,12 @@ impl CosmicMapped {
|
||||||
surface: CosmicSurface,
|
surface: CosmicSurface,
|
||||||
(output, overlap): (&Output, Rectangle<i32, Logical>),
|
(output, overlap): (&Output, Rectangle<i32, Logical>),
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
) {
|
) {
|
||||||
let handle = self.loop_handle();
|
let handle = self.loop_handle();
|
||||||
surface.try_force_undecorated(false);
|
surface.try_force_undecorated(false);
|
||||||
surface.set_tiled(false);
|
surface.set_tiled(false);
|
||||||
let window = CosmicWindow::new(surface, handle, theme);
|
let window = CosmicWindow::new(surface, handle, theme, appearance);
|
||||||
|
|
||||||
if let Some(geo) = *self.last_geometry.lock().unwrap() {
|
if let Some(geo) = *self.last_geometry.lock().unwrap() {
|
||||||
window.set_geometry(geo.to_global(output));
|
window.set_geometry(geo.to_global(output));
|
||||||
|
|
@ -810,6 +813,14 @@ impl CosmicMapped {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) fn update_appearance_conf(&self, appearance: &AppearanceConfig) {
|
||||||
|
match &self.element {
|
||||||
|
CosmicMappedInternal::Window(w) => w.update_appearance_conf(appearance),
|
||||||
|
CosmicMappedInternal::Stack(s) => s.update_appearance_conf(appearance),
|
||||||
|
CosmicMappedInternal::_GenericCatcher(_) => {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub(crate) fn force_redraw(&self) {
|
pub(crate) fn force_redraw(&self) {
|
||||||
match &self.element {
|
match &self.element {
|
||||||
CosmicMappedInternal::Window(w) => w.force_redraw(),
|
CosmicMappedInternal::Window(w) => w.force_redraw(),
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ use cosmic::{
|
||||||
iced_widget::scrollable::AbsoluteOffset,
|
iced_widget::scrollable::AbsoluteOffset,
|
||||||
theme, widget as cosmic_widget,
|
theme, widget as cosmic_widget,
|
||||||
};
|
};
|
||||||
|
use cosmic_comp_config::AppearanceConfig;
|
||||||
use cosmic_settings_config::shortcuts;
|
use cosmic_settings_config::shortcuts;
|
||||||
use shortcuts::action::{Direction, FocusDirection};
|
use shortcuts::action::{Direction, FocusDirection};
|
||||||
use smithay::{
|
use smithay::{
|
||||||
|
|
@ -106,6 +107,7 @@ pub struct CosmicStackInternal {
|
||||||
override_alive: AtomicBool,
|
override_alive: AtomicBool,
|
||||||
geometry: Mutex<Option<Rectangle<i32, Global>>>,
|
geometry: Mutex<Option<Rectangle<i32, Global>>>,
|
||||||
mask: Mutex<Option<tiny_skia::Mask>>,
|
mask: Mutex<Option<tiny_skia::Mask>>,
|
||||||
|
appearance_conf: Mutex<AppearanceConfig>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CosmicStackInternal {
|
impl CosmicStackInternal {
|
||||||
|
|
@ -133,6 +135,7 @@ impl CosmicStack {
|
||||||
windows: impl Iterator<Item = I>,
|
windows: impl Iterator<Item = I>,
|
||||||
handle: LoopHandle<'static, crate::state::State>,
|
handle: LoopHandle<'static, crate::state::State>,
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
) -> CosmicStack {
|
) -> CosmicStack {
|
||||||
let windows = windows.map(Into::into).collect::<Vec<_>>();
|
let windows = windows.map(Into::into).collect::<Vec<_>>();
|
||||||
assert!(!windows.is_empty());
|
assert!(!windows.is_empty());
|
||||||
|
|
@ -159,6 +162,7 @@ impl CosmicStack {
|
||||||
override_alive: AtomicBool::new(true),
|
override_alive: AtomicBool::new(true),
|
||||||
geometry: Mutex::new(None),
|
geometry: Mutex::new(None),
|
||||||
mask: Mutex::new(None),
|
mask: Mutex::new(None),
|
||||||
|
appearance_conf: Mutex::new(appearance),
|
||||||
},
|
},
|
||||||
(width, TAB_HEIGHT),
|
(width, TAB_HEIGHT),
|
||||||
handle,
|
handle,
|
||||||
|
|
@ -681,6 +685,21 @@ impl CosmicStack {
|
||||||
self.0.set_theme(theme);
|
self.0.set_theme(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn update_appearance_conf(&self, appearance: &AppearanceConfig) {
|
||||||
|
if self.0.with_program(|p| {
|
||||||
|
let mut conf = p.appearance_conf.lock().unwrap();
|
||||||
|
if &*conf != appearance {
|
||||||
|
*conf = *appearance;
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}) {
|
||||||
|
self.0.force_redraw();
|
||||||
|
self.0.force_update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub(crate) fn force_redraw(&self) {
|
pub(crate) fn force_redraw(&self) {
|
||||||
self.0.force_redraw();
|
self.0.force_redraw();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
use calloop::LoopHandle;
|
use calloop::LoopHandle;
|
||||||
use cosmic::iced::{Color, Task};
|
use cosmic::iced::{Color, Task};
|
||||||
|
use cosmic_comp_config::AppearanceConfig;
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
input::KeyState,
|
input::KeyState,
|
||||||
|
|
@ -72,23 +73,14 @@ impl fmt::Debug for CosmicWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct CosmicWindowInternal {
|
pub struct CosmicWindowInternal {
|
||||||
pub(super) window: CosmicSurface,
|
pub(super) window: CosmicSurface,
|
||||||
activated: AtomicBool,
|
activated: AtomicBool,
|
||||||
/// TODO: This needs to be per seat
|
/// TODO: This needs to be per seat
|
||||||
pointer_entered: AtomicU8,
|
pointer_entered: AtomicU8,
|
||||||
last_title: Mutex<String>,
|
last_title: Mutex<String>,
|
||||||
}
|
appearance_conf: Mutex<AppearanceConfig>,
|
||||||
|
|
||||||
impl fmt::Debug for CosmicWindowInternal {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
||||||
f.debug_struct("CosmicWindowInternal")
|
|
||||||
.field("window", &self.window)
|
|
||||||
.field("activated", &self.activated.load(Ordering::SeqCst))
|
|
||||||
.field("pointer_entered", &self.pointer_entered)
|
|
||||||
// skip seat to avoid loop
|
|
||||||
.finish()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
|
|
@ -184,6 +176,7 @@ impl CosmicWindow {
|
||||||
window: impl Into<CosmicSurface>,
|
window: impl Into<CosmicSurface>,
|
||||||
handle: LoopHandle<'static, crate::state::State>,
|
handle: LoopHandle<'static, crate::state::State>,
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
) -> CosmicWindow {
|
) -> CosmicWindow {
|
||||||
let window = window.into();
|
let window = window.into();
|
||||||
let width = window.geometry().size.w;
|
let width = window.geometry().size.w;
|
||||||
|
|
@ -194,6 +187,7 @@ impl CosmicWindow {
|
||||||
activated: AtomicBool::new(false),
|
activated: AtomicBool::new(false),
|
||||||
pointer_entered: AtomicU8::new(0),
|
pointer_entered: AtomicU8::new(0),
|
||||||
last_title: Mutex::new(last_title),
|
last_title: Mutex::new(last_title),
|
||||||
|
appearance_conf: Mutex::new(appearance),
|
||||||
},
|
},
|
||||||
(width, SSD_HEIGHT),
|
(width, SSD_HEIGHT),
|
||||||
handle,
|
handle,
|
||||||
|
|
@ -387,6 +381,22 @@ impl CosmicWindow {
|
||||||
self.0.set_theme(theme);
|
self.0.set_theme(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn update_appearance_conf(&self, appearance: &AppearanceConfig) {
|
||||||
|
self.0.with_program(|p| {
|
||||||
|
let mut conf = p.appearance_conf.lock().unwrap();
|
||||||
|
if &*conf != appearance {
|
||||||
|
*conf = *appearance;
|
||||||
|
if appearance.clip_floating_windows {
|
||||||
|
p.window.set_tiled(true);
|
||||||
|
} else {
|
||||||
|
if !p.tiled.load(Ordering::Acquire) {
|
||||||
|
p.window.set_tiled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
pub(crate) fn force_redraw(&self) {
|
pub(crate) fn force_redraw(&self) {
|
||||||
self.0.force_redraw();
|
self.0.force_redraw();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,7 @@ pub fn tab_items(
|
||||||
surface,
|
surface,
|
||||||
state.common.event_loop_handle.clone(),
|
state.common.event_loop_handle.clone(),
|
||||||
state.common.theme.clone(),
|
state.common.theme.clone(),
|
||||||
|
state.common.config.cosmic_conf.appearance_settings,
|
||||||
)
|
)
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ use std::{
|
||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use cosmic_comp_config::AppearanceConfig;
|
||||||
use cosmic_settings_config::shortcuts::action::ResizeDirection;
|
use cosmic_settings_config::shortcuts::action::ResizeDirection;
|
||||||
use keyframe::{ease, functions::EaseInOutCubic};
|
use keyframe::{ease, functions::EaseInOutCubic};
|
||||||
use smithay::{
|
use smithay::{
|
||||||
|
|
@ -59,6 +60,7 @@ pub struct FloatingLayout {
|
||||||
hovered_stack: Option<(CosmicMapped, Rectangle<i32, Local>)>,
|
hovered_stack: Option<(CosmicMapped, Rectangle<i32, Local>)>,
|
||||||
dirty: AtomicBool,
|
dirty: AtomicBool,
|
||||||
pub theme: cosmic::Theme,
|
pub theme: cosmic::Theme,
|
||||||
|
pub appearance: AppearanceConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
@ -263,10 +265,15 @@ impl TiledCorners {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FloatingLayout {
|
impl FloatingLayout {
|
||||||
pub fn new(theme: cosmic::Theme, output: &Output) -> FloatingLayout {
|
pub fn new(
|
||||||
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
|
output: &Output,
|
||||||
|
) -> FloatingLayout {
|
||||||
let mut layout = Self {
|
let mut layout = Self {
|
||||||
theme,
|
theme,
|
||||||
last_output_size: output.geometry().size.as_local(),
|
last_output_size: output.geometry().size.as_local(),
|
||||||
|
appearance,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
layout.space.map_output(output, (0, 0));
|
layout.space.map_output(output, (0, 0));
|
||||||
|
|
@ -1014,7 +1021,11 @@ impl FloatingLayout {
|
||||||
if mapped.is_window() {
|
if mapped.is_window() {
|
||||||
// if it is just a window
|
// if it is just a window
|
||||||
self.space.unmap_elem(&mapped);
|
self.space.unmap_elem(&mapped);
|
||||||
mapped.convert_to_stack((&output, mapped.bbox()), self.theme.clone());
|
mapped.convert_to_stack(
|
||||||
|
(&output, mapped.bbox()),
|
||||||
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
|
);
|
||||||
self.map_internal(
|
self.map_internal(
|
||||||
mapped.clone(),
|
mapped.clone(),
|
||||||
Some(location.as_local()),
|
Some(location.as_local()),
|
||||||
|
|
@ -1031,7 +1042,12 @@ impl FloatingLayout {
|
||||||
|
|
||||||
self.space.unmap_elem(&mapped);
|
self.space.unmap_elem(&mapped);
|
||||||
let handle = mapped.loop_handle();
|
let handle = mapped.loop_handle();
|
||||||
mapped.convert_to_surface(first, (&output, mapped.bbox()), self.theme.clone());
|
mapped.convert_to_surface(
|
||||||
|
first,
|
||||||
|
(&output, mapped.bbox()),
|
||||||
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
|
);
|
||||||
let mut new_elements = vec![mapped.clone()];
|
let mut new_elements = vec![mapped.clone()];
|
||||||
|
|
||||||
// map the rest
|
// map the rest
|
||||||
|
|
@ -1043,6 +1059,7 @@ impl FloatingLayout {
|
||||||
other,
|
other,
|
||||||
handle.clone(),
|
handle.clone(),
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
));
|
));
|
||||||
window.output_enter(&output, window.bbox());
|
window.output_enter(&output, window.bbox());
|
||||||
|
|
||||||
|
|
@ -1094,7 +1111,7 @@ impl FloatingLayout {
|
||||||
StackMoveResult::Handled => MoveResult::Done,
|
StackMoveResult::Handled => MoveResult::Done,
|
||||||
StackMoveResult::MoveOut(surface, loop_handle) => {
|
StackMoveResult::MoveOut(surface, loop_handle) => {
|
||||||
let mapped: CosmicMapped =
|
let mapped: CosmicMapped =
|
||||||
CosmicWindow::new(surface, loop_handle, theme.clone()).into();
|
CosmicWindow::new(surface, loop_handle, theme.clone(), self.appearance).into();
|
||||||
let output = seat.active_output();
|
let output = seat.active_output();
|
||||||
let pos = self.space.element_geometry(element).unwrap().loc
|
let pos = self.space.element_geometry(element).unwrap().loc
|
||||||
+ match direction {
|
+ match direction {
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ use crate::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use cosmic_comp_config::AppearanceConfig;
|
||||||
use cosmic_settings_config::shortcuts::action::{FocusDirection, ResizeDirection};
|
use cosmic_settings_config::shortcuts::action::{FocusDirection, ResizeDirection};
|
||||||
use id_tree::{InsertBehavior, MoveBehavior, Node, NodeId, NodeIdError, RemoveBehavior, Tree};
|
use id_tree::{InsertBehavior, MoveBehavior, Node, NodeId, NodeIdError, RemoveBehavior, Tree};
|
||||||
use keyframe::{
|
use keyframe::{
|
||||||
|
|
@ -134,6 +135,7 @@ pub struct TilingLayout {
|
||||||
swapping_stack_surface_id: Id,
|
swapping_stack_surface_id: Id,
|
||||||
last_overview_hover: Option<(Option<Instant>, TargetZone)>,
|
last_overview_hover: Option<(Option<Instant>, TargetZone)>,
|
||||||
pub theme: cosmic::Theme,
|
pub theme: cosmic::Theme,
|
||||||
|
pub appearance: AppearanceConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
|
|
@ -345,7 +347,11 @@ pub struct RestoreTilingState {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TilingLayout {
|
impl TilingLayout {
|
||||||
pub fn new(theme: cosmic::Theme, output: &Output) -> TilingLayout {
|
pub fn new(
|
||||||
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
|
output: &Output,
|
||||||
|
) -> TilingLayout {
|
||||||
TilingLayout {
|
TilingLayout {
|
||||||
queue: TreeQueue {
|
queue: TreeQueue {
|
||||||
trees: {
|
trees: {
|
||||||
|
|
@ -360,6 +366,7 @@ impl TilingLayout {
|
||||||
swapping_stack_surface_id: Id::new(),
|
swapping_stack_surface_id: Id::new(),
|
||||||
last_overview_hover: None,
|
last_overview_hover: None,
|
||||||
theme,
|
theme,
|
||||||
|
appearance,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -664,9 +671,13 @@ impl TilingLayout {
|
||||||
let _ = this.unmap(this_mapped, None);
|
let _ = this.unmap(this_mapped, None);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mapped: CosmicMapped =
|
let mapped: CosmicMapped = CosmicWindow::new(
|
||||||
CosmicWindow::new(stack_surface, this_stack.loop_handle(), this.theme.clone())
|
stack_surface,
|
||||||
.into();
|
this_stack.loop_handle(),
|
||||||
|
this.theme.clone(),
|
||||||
|
this.appearance,
|
||||||
|
)
|
||||||
|
.into();
|
||||||
if this.output != other.output {
|
if this.output != other.output {
|
||||||
mapped.output_leave(&this.output);
|
mapped.output_leave(&this.output);
|
||||||
mapped.output_enter(&other.output, mapped.bbox());
|
mapped.output_enter(&other.output, mapped.bbox());
|
||||||
|
|
@ -1071,6 +1082,7 @@ impl TilingLayout {
|
||||||
this_surface.clone(),
|
this_surface.clone(),
|
||||||
this_stack.loop_handle(),
|
this_stack.loop_handle(),
|
||||||
this.theme.clone(),
|
this.theme.clone(),
|
||||||
|
this.appearance,
|
||||||
)
|
)
|
||||||
.into();
|
.into();
|
||||||
mapped.set_tiled(true);
|
mapped.set_tiled(true);
|
||||||
|
|
@ -1156,6 +1168,7 @@ impl TilingLayout {
|
||||||
other_surface.clone(),
|
other_surface.clone(),
|
||||||
other_stack.loop_handle(),
|
other_stack.loop_handle(),
|
||||||
this.theme.clone(),
|
this.theme.clone(),
|
||||||
|
this.appearance,
|
||||||
)
|
)
|
||||||
.into();
|
.into();
|
||||||
mapped.set_tiled(true);
|
mapped.set_tiled(true);
|
||||||
|
|
@ -1504,8 +1517,13 @@ impl TilingLayout {
|
||||||
match window.handle_move(direction) {
|
match window.handle_move(direction) {
|
||||||
StackMoveResult::Handled => return MoveResult::Done,
|
StackMoveResult::Handled => return MoveResult::Done,
|
||||||
StackMoveResult::MoveOut(surface, loop_handle) => {
|
StackMoveResult::MoveOut(surface, loop_handle) => {
|
||||||
let mapped: CosmicMapped =
|
let mapped: CosmicMapped = CosmicWindow::new(
|
||||||
CosmicWindow::new(surface, loop_handle, self.theme.clone()).into();
|
surface,
|
||||||
|
loop_handle,
|
||||||
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
|
)
|
||||||
|
.into();
|
||||||
mapped.output_enter(&self.output, mapped.bbox());
|
mapped.output_enter(&self.output, mapped.bbox());
|
||||||
let orientation = match direction {
|
let orientation = match direction {
|
||||||
Direction::Left | Direction::Right => Orientation::Vertical,
|
Direction::Left | Direction::Right => Orientation::Vertical,
|
||||||
|
|
@ -2126,7 +2144,11 @@ impl TilingLayout {
|
||||||
// if it is just a window
|
// if it is just a window
|
||||||
match tree.get_mut(&node_id).unwrap().data_mut() {
|
match tree.get_mut(&node_id).unwrap().data_mut() {
|
||||||
Data::Mapped { mapped, .. } => {
|
Data::Mapped { mapped, .. } => {
|
||||||
mapped.convert_to_stack((&self.output, mapped.bbox()), self.theme.clone());
|
mapped.convert_to_stack(
|
||||||
|
(&self.output, mapped.bbox()),
|
||||||
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
|
);
|
||||||
focus_stack.append(mapped.clone());
|
focus_stack.append(mapped.clone());
|
||||||
KeyboardFocusTarget::Element(mapped.clone())
|
KeyboardFocusTarget::Element(mapped.clone())
|
||||||
}
|
}
|
||||||
|
|
@ -2147,6 +2169,7 @@ impl TilingLayout {
|
||||||
first,
|
first,
|
||||||
(&self.output, mapped.bbox()),
|
(&self.output, mapped.bbox()),
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
);
|
);
|
||||||
new_elements.push(mapped.clone());
|
new_elements.push(mapped.clone());
|
||||||
handle
|
handle
|
||||||
|
|
@ -2164,6 +2187,7 @@ impl TilingLayout {
|
||||||
other,
|
other,
|
||||||
handle.clone(),
|
handle.clone(),
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
));
|
));
|
||||||
window.output_enter(&self.output, window.bbox());
|
window.output_enter(&self.output, window.bbox());
|
||||||
|
|
||||||
|
|
@ -2261,7 +2285,12 @@ impl TilingLayout {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let handle = handle.unwrap();
|
let handle = handle.unwrap();
|
||||||
let stack = CosmicStack::new(surfaces.into_iter(), handle, self.theme.clone());
|
let stack = CosmicStack::new(
|
||||||
|
surfaces.into_iter(),
|
||||||
|
handle,
|
||||||
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
|
);
|
||||||
|
|
||||||
for child in tree
|
for child in tree
|
||||||
.children_ids(&last_active)
|
.children_ids(&last_active)
|
||||||
|
|
@ -2732,7 +2761,11 @@ impl TilingLayout {
|
||||||
Some(TargetZone::WindowStack(window_id, _)) if tree.get(window_id).is_ok() => {
|
Some(TargetZone::WindowStack(window_id, _)) if tree.get(window_id).is_ok() => {
|
||||||
match tree.get_mut(window_id).unwrap().data_mut() {
|
match tree.get_mut(window_id).unwrap().data_mut() {
|
||||||
Data::Mapped { mapped, .. } => {
|
Data::Mapped { mapped, .. } => {
|
||||||
mapped.convert_to_stack((&self.output, mapped.bbox()), self.theme.clone());
|
mapped.convert_to_stack(
|
||||||
|
(&self.output, mapped.bbox()),
|
||||||
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
|
);
|
||||||
let Some(stack) = mapped.stack_ref() else {
|
let Some(stack) = mapped.stack_ref() else {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use crate::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use cosmic_comp_config::{
|
use cosmic_comp_config::{
|
||||||
TileBehavior, ZoomConfig, ZoomMovement,
|
AppearanceConfig, TileBehavior, ZoomConfig, ZoomMovement,
|
||||||
workspace::{PinnedWorkspace, WorkspaceLayout, WorkspaceMode},
|
workspace::{PinnedWorkspace, WorkspaceLayout, WorkspaceMode},
|
||||||
};
|
};
|
||||||
use cosmic_config::ConfigSet;
|
use cosmic_config::ConfigSet;
|
||||||
|
|
@ -286,6 +286,7 @@ pub struct Shell {
|
||||||
)>,
|
)>,
|
||||||
resize_indicator: Option<ResizeIndicator>,
|
resize_indicator: Option<ResizeIndicator>,
|
||||||
zoom_state: Option<ZoomState>,
|
zoom_state: Option<ZoomState>,
|
||||||
|
appearance_conf: AppearanceConfig,
|
||||||
tiling_exceptions: TilingExceptions,
|
tiling_exceptions: TilingExceptions,
|
||||||
|
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
|
|
@ -356,6 +357,7 @@ pub struct WorkspaceSet {
|
||||||
tiling_enabled: bool,
|
tiling_enabled: bool,
|
||||||
output: Output,
|
output: Output,
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
pub sticky_layer: FloatingLayout,
|
pub sticky_layer: FloatingLayout,
|
||||||
pub minimized_windows: Vec<MinimizedWindow>,
|
pub minimized_windows: Vec<MinimizedWindow>,
|
||||||
pub workspaces: Vec<Workspace>,
|
pub workspaces: Vec<Workspace>,
|
||||||
|
|
@ -368,6 +370,7 @@ fn create_workspace(
|
||||||
active: bool,
|
active: bool,
|
||||||
tiling: bool,
|
tiling: bool,
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
) -> Workspace {
|
) -> Workspace {
|
||||||
let workspace_handle = state
|
let workspace_handle = state
|
||||||
.create_workspace(
|
.create_workspace(
|
||||||
|
|
@ -391,7 +394,13 @@ fn create_workspace(
|
||||||
| WorkspaceCapabilities::Pin
|
| WorkspaceCapabilities::Pin
|
||||||
| WorkspaceCapabilities::Move,
|
| WorkspaceCapabilities::Move,
|
||||||
);
|
);
|
||||||
Workspace::new(workspace_handle, output.clone(), tiling, theme.clone())
|
Workspace::new(
|
||||||
|
workspace_handle,
|
||||||
|
output.clone(),
|
||||||
|
tiling,
|
||||||
|
theme.clone(),
|
||||||
|
appearance,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_workspace_from_pinned(
|
fn create_workspace_from_pinned(
|
||||||
|
|
@ -401,6 +410,7 @@ fn create_workspace_from_pinned(
|
||||||
group_handle: &WorkspaceGroupHandle,
|
group_handle: &WorkspaceGroupHandle,
|
||||||
active: bool,
|
active: bool,
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
) -> Workspace {
|
) -> Workspace {
|
||||||
let workspace_handle = state
|
let workspace_handle = state
|
||||||
.create_workspace(
|
.create_workspace(
|
||||||
|
|
@ -424,7 +434,13 @@ fn create_workspace_from_pinned(
|
||||||
| WorkspaceCapabilities::Pin
|
| WorkspaceCapabilities::Pin
|
||||||
| WorkspaceCapabilities::Move,
|
| WorkspaceCapabilities::Move,
|
||||||
);
|
);
|
||||||
Workspace::from_pinned(pinned, workspace_handle, output.clone(), theme.clone())
|
Workspace::from_pinned(
|
||||||
|
pinned,
|
||||||
|
workspace_handle,
|
||||||
|
output.clone(),
|
||||||
|
theme.clone(),
|
||||||
|
appearance,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We will probably need this again at some point
|
/* We will probably need this again at some point
|
||||||
|
|
@ -458,21 +474,23 @@ impl WorkspaceSet {
|
||||||
state: &mut WorkspaceUpdateGuard<'_, State>,
|
state: &mut WorkspaceUpdateGuard<'_, State>,
|
||||||
output: &Output,
|
output: &Output,
|
||||||
tiling_enabled: bool,
|
tiling_enabled: bool,
|
||||||
theme: cosmic::Theme,
|
theme: &cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
) -> WorkspaceSet {
|
) -> WorkspaceSet {
|
||||||
let group_handle = state.create_workspace_group();
|
let group_handle = state.create_workspace_group();
|
||||||
let sticky_layer = FloatingLayout::new(theme.clone(), output);
|
let sticky_layer = FloatingLayout::new(theme.clone(), appearance.clone(), output);
|
||||||
|
|
||||||
WorkspaceSet {
|
WorkspaceSet {
|
||||||
previously_active: None,
|
previously_active: None,
|
||||||
active: 0,
|
active: 0,
|
||||||
group: group_handle,
|
group: group_handle,
|
||||||
tiling_enabled,
|
tiling_enabled,
|
||||||
theme,
|
theme: theme.clone(),
|
||||||
sticky_layer,
|
sticky_layer,
|
||||||
minimized_windows: Vec::new(),
|
minimized_windows: Vec::new(),
|
||||||
workspaces: Vec::new(),
|
workspaces: Vec::new(),
|
||||||
output: output.clone(),
|
output: output.clone(),
|
||||||
|
appearance,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -590,6 +608,7 @@ impl WorkspaceSet {
|
||||||
false,
|
false,
|
||||||
self.tiling_enabled,
|
self.tiling_enabled,
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
);
|
);
|
||||||
workspace_set_idx(
|
workspace_set_idx(
|
||||||
state,
|
state,
|
||||||
|
|
@ -718,6 +737,7 @@ pub struct Workspaces {
|
||||||
autotile: bool,
|
autotile: bool,
|
||||||
autotile_behavior: TileBehavior,
|
autotile_behavior: TileBehavior,
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
// Persisted workspace to add on first `output_add`
|
// Persisted workspace to add on first `output_add`
|
||||||
persisted_workspaces: Vec<PinnedWorkspace>,
|
persisted_workspaces: Vec<PinnedWorkspace>,
|
||||||
}
|
}
|
||||||
|
|
@ -732,6 +752,7 @@ impl Workspaces {
|
||||||
autotile: config.cosmic_conf.autotile,
|
autotile: config.cosmic_conf.autotile,
|
||||||
autotile_behavior: config.cosmic_conf.autotile_behavior,
|
autotile_behavior: config.cosmic_conf.autotile_behavior,
|
||||||
theme,
|
theme,
|
||||||
|
appearance: config.cosmic_conf.appearance_settings.clone(),
|
||||||
persisted_workspaces: config.cosmic_conf.pinned_workspaces.clone(),
|
persisted_workspaces: config.cosmic_conf.pinned_workspaces.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -753,7 +774,13 @@ impl Workspaces {
|
||||||
set
|
set
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
WorkspaceSet::new(workspace_state, output, self.autotile, self.theme.clone())
|
WorkspaceSet::new(
|
||||||
|
workspace_state,
|
||||||
|
output,
|
||||||
|
self.autotile,
|
||||||
|
&self.theme,
|
||||||
|
self.appearance,
|
||||||
|
)
|
||||||
});
|
});
|
||||||
workspace_state.add_group_output(&set.group, output);
|
workspace_state.add_group_output(&set.group, output);
|
||||||
|
|
||||||
|
|
@ -766,6 +793,7 @@ impl Workspaces {
|
||||||
&set.group,
|
&set.group,
|
||||||
false,
|
false,
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
);
|
);
|
||||||
set.workspaces.push(workspace);
|
set.workspaces.push(workspace);
|
||||||
}
|
}
|
||||||
|
|
@ -1043,6 +1071,16 @@ impl Workspaces {
|
||||||
let old_mode = self.mode;
|
let old_mode = self.mode;
|
||||||
self.mode = config.cosmic_conf.workspaces.workspace_mode;
|
self.mode = config.cosmic_conf.workspaces.workspace_mode;
|
||||||
self.layout = config.cosmic_conf.workspaces.workspace_layout;
|
self.layout = config.cosmic_conf.workspaces.workspace_layout;
|
||||||
|
self.appearance = config.cosmic_conf.appearance_settings;
|
||||||
|
|
||||||
|
for set in self.sets.values_mut() {
|
||||||
|
set.appearance = self.appearance;
|
||||||
|
set.sticky_layer.appearance = self.appearance;
|
||||||
|
for workspace in set.workspaces.iter_mut() {
|
||||||
|
workspace.floating_layer.appearance = self.appearance;
|
||||||
|
workspace.tiling_layer.appearance = self.appearance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if self.sets.len() <= 1 {
|
if self.sets.len() <= 1 {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1089,6 +1127,7 @@ impl Workspaces {
|
||||||
false,
|
false,
|
||||||
config.cosmic_conf.autotile,
|
config.cosmic_conf.autotile,
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -1422,6 +1461,7 @@ impl Common {
|
||||||
let mut shell = self.shell.write();
|
let mut shell = self.shell.write();
|
||||||
let shell_ref = &mut *shell;
|
let shell_ref = &mut *shell;
|
||||||
shell_ref.active_hint = self.config.cosmic_conf.active_hint;
|
shell_ref.active_hint = self.config.cosmic_conf.active_hint;
|
||||||
|
shell_ref.appearance_conf = self.config.cosmic_conf.appearance_settings.clone();
|
||||||
if let Some(zoom_state) = shell_ref.zoom_state.as_mut() {
|
if let Some(zoom_state) = shell_ref.zoom_state.as_mut() {
|
||||||
zoom_state.increment = self.config.cosmic_conf.accessibility_zoom.increment;
|
zoom_state.increment = self.config.cosmic_conf.accessibility_zoom.increment;
|
||||||
zoom_state.movement = self.config.cosmic_conf.accessibility_zoom.view_moves;
|
zoom_state.movement = self.config.cosmic_conf.accessibility_zoom.view_moves;
|
||||||
|
|
@ -1441,6 +1481,10 @@ impl Common {
|
||||||
&mut workspace_state,
|
&mut workspace_state,
|
||||||
&self.xdg_activation_state,
|
&self.xdg_activation_state,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
for mapped in shell_ref.mapped() {
|
||||||
|
mapped.update_appearance_conf(&self.config.cosmic_conf.appearance_settings);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[profiling::function]
|
#[profiling::function]
|
||||||
|
|
@ -1550,6 +1594,7 @@ impl Shell {
|
||||||
resize_mode: ResizeMode::None,
|
resize_mode: ResizeMode::None,
|
||||||
resize_state: None,
|
resize_state: None,
|
||||||
resize_indicator: None,
|
resize_indicator: None,
|
||||||
|
appearance_conf: config.cosmic_conf.appearance_settings.clone(),
|
||||||
zoom_state: None,
|
zoom_state: None,
|
||||||
tiling_exceptions,
|
tiling_exceptions,
|
||||||
|
|
||||||
|
|
@ -2252,6 +2297,10 @@ impl Shell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn appearance_config(&self) -> AppearanceConfig {
|
||||||
|
self.appearance_conf.clone()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn trigger_zoom(
|
pub fn trigger_zoom(
|
||||||
&mut self,
|
&mut self,
|
||||||
seat: &Seat<State>,
|
seat: &Seat<State>,
|
||||||
|
|
@ -2454,6 +2503,7 @@ impl Shell {
|
||||||
surface,
|
surface,
|
||||||
loop_handle.clone(),
|
loop_handle.clone(),
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance_conf,
|
||||||
));
|
));
|
||||||
|
|
||||||
if let Some(FullscreenRestoreState::Sticky { output, state, .. }) = &state {
|
if let Some(FullscreenRestoreState::Sticky { output, state, .. }) = &state {
|
||||||
|
|
@ -2730,6 +2780,7 @@ impl Shell {
|
||||||
window.clone(),
|
window.clone(),
|
||||||
loop_handle.clone(),
|
loop_handle.clone(),
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance_conf,
|
||||||
));
|
));
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
{
|
{
|
||||||
|
|
@ -3117,6 +3168,7 @@ impl Shell {
|
||||||
window.clone(),
|
window.clone(),
|
||||||
evlh.clone(),
|
evlh.clone(),
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance_conf,
|
||||||
));
|
));
|
||||||
window.set_minimized(true);
|
window.set_minimized(true);
|
||||||
MinimizedWindow::Floating { window, previous }
|
MinimizedWindow::Floating { window, previous }
|
||||||
|
|
@ -3126,6 +3178,7 @@ impl Shell {
|
||||||
window.clone(),
|
window.clone(),
|
||||||
evlh.clone(),
|
evlh.clone(),
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance_conf,
|
||||||
));
|
));
|
||||||
window.set_minimized(true);
|
window.set_minimized(true);
|
||||||
MinimizedWindow::Tiling { window, previous }
|
MinimizedWindow::Tiling { window, previous }
|
||||||
|
|
@ -3184,6 +3237,7 @@ impl Shell {
|
||||||
window.clone(),
|
window.clone(),
|
||||||
evlh.clone(),
|
evlh.clone(),
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance_conf,
|
||||||
));
|
));
|
||||||
let position = match window_state {
|
let position = match window_state {
|
||||||
WorkspaceRestoreData::Floating(Some(data)) => Some(
|
WorkspaceRestoreData::Floating(Some(data)) => Some(
|
||||||
|
|
@ -3200,6 +3254,7 @@ impl Shell {
|
||||||
window.clone(),
|
window.clone(),
|
||||||
evlh.clone(),
|
evlh.clone(),
|
||||||
self.theme.clone(),
|
self.theme.clone(),
|
||||||
|
self.appearance_conf,
|
||||||
));
|
));
|
||||||
for mapped in to_workspace
|
for mapped in to_workspace
|
||||||
.mapped()
|
.mapped()
|
||||||
|
|
@ -3537,8 +3592,13 @@ impl Shell {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let mapped = if move_out_of_stack {
|
let mapped = if move_out_of_stack {
|
||||||
let new_mapped: CosmicMapped =
|
let new_mapped: CosmicMapped = CosmicWindow::new(
|
||||||
CosmicWindow::new(window.clone(), evlh.clone(), self.theme.clone()).into();
|
window.clone(),
|
||||||
|
evlh.clone(),
|
||||||
|
self.theme.clone(),
|
||||||
|
self.appearance_conf,
|
||||||
|
)
|
||||||
|
.into();
|
||||||
if old_mapped.is_maximized(false) {
|
if old_mapped.is_maximized(false) {
|
||||||
new_mapped.set_maximized(false);
|
new_mapped.set_maximized(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ use crate::{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
use cosmic_comp_config::AppearanceConfig;
|
||||||
use cosmic_comp_config::workspace::{OutputMatch, PinnedWorkspace};
|
use cosmic_comp_config::workspace::{OutputMatch, PinnedWorkspace};
|
||||||
|
|
||||||
use cosmic::theme::CosmicTheme;
|
use cosmic::theme::CosmicTheme;
|
||||||
|
|
@ -359,9 +360,10 @@ impl Workspace {
|
||||||
output: Output,
|
output: Output,
|
||||||
tiling_enabled: bool,
|
tiling_enabled: bool,
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
) -> Workspace {
|
) -> Workspace {
|
||||||
let tiling_layer = TilingLayout::new(theme.clone(), &output);
|
let tiling_layer = TilingLayout::new(theme.clone(), appearance, &output);
|
||||||
let floating_layer = FloatingLayout::new(theme, &output);
|
let floating_layer = FloatingLayout::new(theme, appearance, &output);
|
||||||
let output_match = output_match_for_output(&output);
|
let output_match = output_match_for_output(&output);
|
||||||
|
|
||||||
Workspace {
|
Workspace {
|
||||||
|
|
@ -391,9 +393,10 @@ impl Workspace {
|
||||||
handle: WorkspaceHandle,
|
handle: WorkspaceHandle,
|
||||||
output: Output,
|
output: Output,
|
||||||
theme: cosmic::Theme,
|
theme: cosmic::Theme,
|
||||||
|
appearance: AppearanceConfig,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let tiling_layer = TilingLayout::new(theme.clone(), &output);
|
let tiling_layer = TilingLayout::new(theme.clone(), appearance, &output);
|
||||||
let floating_layer = FloatingLayout::new(theme, &output);
|
let floating_layer = FloatingLayout::new(theme, appearance, &output);
|
||||||
let output_match = output_match_for_output(&output);
|
let output_match = output_match_for_output(&output);
|
||||||
|
|
||||||
Workspace {
|
Workspace {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue