theme: Revert theming of tiling overview (fix #347)

This commit is contained in:
Victoria Brekenfeld 2024-03-11 17:07:39 +01:00
parent e959e4f1ac
commit c685440155
3 changed files with 13 additions and 11 deletions

View file

@ -96,6 +96,8 @@ pub type GlMultiError = MultiError<
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 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);

View file

@ -1,7 +1,10 @@
// SPDX-License-Identifier: GPL-3.0-only
use crate::{
backend::render::{element::AsGlowRenderer, BackdropShader, IndicatorShader, Key, Usage},
backend::render::{
element::AsGlowRenderer, BackdropShader, IndicatorShader, Key, Usage, ACTIVE_GROUP_COLOR,
GROUP_COLOR,
},
shell::{
element::{
resize_indicator::ResizeIndicator,
@ -22,7 +25,6 @@ use crate::{
CosmicSurface, Direction, FocusResult, MoveResult, OutputNotMapped, OverviewMode,
ResizeDirection, ResizeMode, Trigger,
},
theme::group_color,
utils::{prelude::*, tween::EaseRectangle},
wayland::{
handlers::xdg_shell::popup::get_popup_toplevel,
@ -4017,7 +4019,7 @@ fn geometries_for_groupview<'a, R>(
mouse_tiling: Option<Option<&TargetZone>>,
swap_desc: Option<NodeDesc>,
swap_tree: Option<&Tree<Data>>,
theme: &cosmic::theme::CosmicTheme,
_theme: &cosmic::theme::CosmicTheme,
) -> (
HashMap<NodeId, Rectangle<i32, Local>>,
Vec<CosmicMappedRenderElement<R>>,
@ -4175,7 +4177,7 @@ where
)
};
let group_color = group_color(theme);
let group_color = GROUP_COLOR;
match data {
Data::Group {
@ -4547,7 +4549,7 @@ where
geo.size -= (gap * 2, gap * 2).into();
}
let accent = theme.accent.base;
let accent = ACTIVE_GROUP_COLOR;
if focused
.as_ref()
@ -4563,7 +4565,7 @@ where
Some(Some(TargetZone::WindowStack(stack_id, _)))
if *stack_id == node_id =>
{
[accent.red, accent.green, accent.blue]
accent
}
_ => group_color,
};
@ -4580,9 +4582,7 @@ where
* if focused
.as_ref()
.map(|focused_id| focused_id == &node_id)
.unwrap_or(
color == [accent.red, accent.green, accent.blue],
)
.unwrap_or(color == accent)
{
0.4
} else {
@ -4881,7 +4881,7 @@ where
let swap_tree = swap_tree.flatten().filter(|_| is_active_output);
let swap_desc = swap_desc.filter(|_| is_active_output);
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
if target_tree.root_node_id().is_none() && swap_desc.is_some() {
window_elements.push(

View file

@ -7,7 +7,7 @@ use cosmic::cosmic_theme::{palette, Theme, ThemeMode};
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;
[neutral_8.red, neutral_8.green, neutral_8.blue]
}