theme: Revert theming of tiling overview (fix #347)
This commit is contained in:
parent
e959e4f1ac
commit
c685440155
3 changed files with 13 additions and 11 deletions
|
|
@ -96,6 +96,8 @@ pub type GlMultiError = MultiError<
|
||||||
pub static CLEAR_COLOR: [f32; 4] = [0.153, 0.161, 0.165, 1.0];
|
pub static CLEAR_COLOR: [f32; 4] = [0.153, 0.161, 0.165, 1.0];
|
||||||
pub static OUTLINE_SHADER: &str = include_str!("./shaders/rounded_outline.frag");
|
pub static OUTLINE_SHADER: &str = include_str!("./shaders/rounded_outline.frag");
|
||||||
pub static RECTANGLE_SHADER: &str = include_str!("./shaders/rounded_rectangle.frag");
|
pub static RECTANGLE_SHADER: &str = include_str!("./shaders/rounded_rectangle.frag");
|
||||||
|
pub static GROUP_COLOR: [f32; 3] = [0.788, 0.788, 0.788];
|
||||||
|
pub static ACTIVE_GROUP_COLOR: [f32; 3] = [0.58, 0.922, 0.922];
|
||||||
|
|
||||||
pub struct IndicatorShader(pub GlesPixelProgram);
|
pub struct IndicatorShader(pub GlesPixelProgram);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
backend::render::{element::AsGlowRenderer, BackdropShader, IndicatorShader, Key, Usage},
|
backend::render::{
|
||||||
|
element::AsGlowRenderer, BackdropShader, IndicatorShader, Key, Usage, ACTIVE_GROUP_COLOR,
|
||||||
|
GROUP_COLOR,
|
||||||
|
},
|
||||||
shell::{
|
shell::{
|
||||||
element::{
|
element::{
|
||||||
resize_indicator::ResizeIndicator,
|
resize_indicator::ResizeIndicator,
|
||||||
|
|
@ -22,7 +25,6 @@ use crate::{
|
||||||
CosmicSurface, Direction, FocusResult, MoveResult, OutputNotMapped, OverviewMode,
|
CosmicSurface, Direction, FocusResult, MoveResult, OutputNotMapped, OverviewMode,
|
||||||
ResizeDirection, ResizeMode, Trigger,
|
ResizeDirection, ResizeMode, Trigger,
|
||||||
},
|
},
|
||||||
theme::group_color,
|
|
||||||
utils::{prelude::*, tween::EaseRectangle},
|
utils::{prelude::*, tween::EaseRectangle},
|
||||||
wayland::{
|
wayland::{
|
||||||
handlers::xdg_shell::popup::get_popup_toplevel,
|
handlers::xdg_shell::popup::get_popup_toplevel,
|
||||||
|
|
@ -4017,7 +4019,7 @@ fn geometries_for_groupview<'a, R>(
|
||||||
mouse_tiling: Option<Option<&TargetZone>>,
|
mouse_tiling: Option<Option<&TargetZone>>,
|
||||||
swap_desc: Option<NodeDesc>,
|
swap_desc: Option<NodeDesc>,
|
||||||
swap_tree: Option<&Tree<Data>>,
|
swap_tree: Option<&Tree<Data>>,
|
||||||
theme: &cosmic::theme::CosmicTheme,
|
_theme: &cosmic::theme::CosmicTheme,
|
||||||
) -> (
|
) -> (
|
||||||
HashMap<NodeId, Rectangle<i32, Local>>,
|
HashMap<NodeId, Rectangle<i32, Local>>,
|
||||||
Vec<CosmicMappedRenderElement<R>>,
|
Vec<CosmicMappedRenderElement<R>>,
|
||||||
|
|
@ -4175,7 +4177,7 @@ where
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
let group_color = group_color(theme);
|
let group_color = GROUP_COLOR;
|
||||||
|
|
||||||
match data {
|
match data {
|
||||||
Data::Group {
|
Data::Group {
|
||||||
|
|
@ -4547,7 +4549,7 @@ where
|
||||||
geo.size -= (gap * 2, gap * 2).into();
|
geo.size -= (gap * 2, gap * 2).into();
|
||||||
}
|
}
|
||||||
|
|
||||||
let accent = theme.accent.base;
|
let accent = ACTIVE_GROUP_COLOR;
|
||||||
|
|
||||||
if focused
|
if focused
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
|
@ -4563,7 +4565,7 @@ where
|
||||||
Some(Some(TargetZone::WindowStack(stack_id, _)))
|
Some(Some(TargetZone::WindowStack(stack_id, _)))
|
||||||
if *stack_id == node_id =>
|
if *stack_id == node_id =>
|
||||||
{
|
{
|
||||||
[accent.red, accent.green, accent.blue]
|
accent
|
||||||
}
|
}
|
||||||
_ => group_color,
|
_ => group_color,
|
||||||
};
|
};
|
||||||
|
|
@ -4580,9 +4582,7 @@ where
|
||||||
* if focused
|
* if focused
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|focused_id| focused_id == &node_id)
|
.map(|focused_id| focused_id == &node_id)
|
||||||
.unwrap_or(
|
.unwrap_or(color == accent)
|
||||||
color == [accent.red, accent.green, accent.blue],
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
0.4
|
0.4
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -4881,7 +4881,7 @@ where
|
||||||
let swap_tree = swap_tree.flatten().filter(|_| is_active_output);
|
let swap_tree = swap_tree.flatten().filter(|_| is_active_output);
|
||||||
let swap_desc = swap_desc.filter(|_| is_active_output);
|
let swap_desc = swap_desc.filter(|_| is_active_output);
|
||||||
let window_hint = crate::theme::active_window_hint(theme);
|
let window_hint = crate::theme::active_window_hint(theme);
|
||||||
let group_color = group_color(theme);
|
let group_color = GROUP_COLOR;
|
||||||
// render placeholder, if we are swapping to an empty workspace
|
// render placeholder, if we are swapping to an empty workspace
|
||||||
if target_tree.root_node_id().is_none() && swap_desc.is_some() {
|
if target_tree.root_node_id().is_none() && swap_desc.is_some() {
|
||||||
window_elements.push(
|
window_elements.push(
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use cosmic::cosmic_theme::{palette, Theme, ThemeMode};
|
||||||
|
|
||||||
use crate::state::State;
|
use crate::state::State;
|
||||||
|
|
||||||
pub(crate) fn group_color(theme: &Theme) -> [f32; 3] {
|
pub(crate) fn _group_color(theme: &Theme) -> [f32; 3] {
|
||||||
let neutral_8 = theme.palette.neutral_8;
|
let neutral_8 = theme.palette.neutral_8;
|
||||||
[neutral_8.red, neutral_8.green, neutral_8.blue]
|
[neutral_8.red, neutral_8.green, neutral_8.blue]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue