fix: test
This commit is contained in:
parent
bb0145c566
commit
be499d01af
5 changed files with 21 additions and 21 deletions
|
|
@ -1,16 +1,18 @@
|
||||||
|
use crate::color::color_serde::option as color_serde_option;
|
||||||
|
use crate::color::{ColorRepr, ColorReprOption, color_serde};
|
||||||
use crate::composite::over;
|
use crate::composite::over;
|
||||||
use crate::steps::{color_index, get_small_widget_color, get_surface_color, get_text, steps};
|
use crate::steps::{color_index, get_small_widget_color, get_surface_color, get_text, steps};
|
||||||
use crate::{
|
use crate::{
|
||||||
Component, Container, CornerRadii, CosmicPalette, CosmicPaletteInner, DARK_PALETTE,
|
Component, Container, CornerRadii, CosmicPalette, CosmicPaletteInner, DARK_PALETTE,
|
||||||
LIGHT_PALETTE, NAME, Spacing, ThemeMode,
|
LIGHT_PALETTE, NAME, Spacing, ThemeMode,
|
||||||
color::{ColorRepr, ColorReprOption, color_serde, color_serde::option as color_serde_option},
|
|
||||||
};
|
};
|
||||||
use cosmic_config::{Config, CosmicConfigEntry};
|
use cosmic_config::{Config, CosmicConfigEntry};
|
||||||
use palette::color_difference::Wcag21RelativeContrast;
|
use palette::color_difference::Wcag21RelativeContrast;
|
||||||
use palette::rgb::Rgb;
|
use palette::rgb::Rgb;
|
||||||
use palette::{IntoColor, Oklcha, Srgb, Srgba, WithAlpha};
|
use palette::{IntoColor, Oklcha, Srgb, Srgba, WithAlpha};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::{default, num::NonZeroUsize};
|
use std::default;
|
||||||
|
use std::num::NonZeroUsize;
|
||||||
|
|
||||||
/// ID for the current dark `ThemeBuilder` config
|
/// ID for the current dark `ThemeBuilder` config
|
||||||
pub const DARK_THEME_BUILDER_ID: &str = "com.system76.CosmicTheme.Dark.Builder";
|
pub const DARK_THEME_BUILDER_ID: &str = "com.system76.CosmicTheme.Dark.Builder";
|
||||||
|
|
|
||||||
2
iced
2
iced
|
|
@ -1 +1 @@
|
||||||
Subproject commit cff835bc64e887b3db5c1fafa1f4c5cdf8db1b42
|
Subproject commit c781ff6199715f5650411c7ac625d4e1929bfdfb
|
||||||
|
|
@ -385,13 +385,11 @@ where
|
||||||
my_state: &mut MenuBarState,
|
my_state: &mut MenuBarState,
|
||||||
) {
|
) {
|
||||||
if self.window_id != window::Id::NONE && self.on_surface_action.is_some() {
|
if self.window_id != window::Id::NONE && self.on_surface_action.is_some() {
|
||||||
use crate::{
|
use crate::surface::action::{LiveSettings, destroy_popup};
|
||||||
surface::action::{LiveSettings, destroy_popup},
|
use crate::theme::THEME;
|
||||||
theme::THEME,
|
use iced_runtime::platform_specific::wayland::CornerRadius;
|
||||||
};
|
use iced_runtime::platform_specific::wayland::popup::{
|
||||||
use iced_runtime::platform_specific::wayland::{
|
SctkPopupSettings, SctkPositioner,
|
||||||
CornerRadius,
|
|
||||||
popup::{SctkPopupSettings, SctkPositioner},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let surface_action = self.on_surface_action.as_ref().unwrap();
|
let surface_action = self.on_surface_action.as_ref().unwrap();
|
||||||
|
|
|
||||||
|
|
@ -999,12 +999,13 @@ impl<Message: std::clone::Clone + 'static> Widget<Message, crate::Theme, crate::
|
||||||
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
||||||
&& let Some((new_root, new_ms)) = new_root
|
&& let Some((new_root, new_ms)) = new_root
|
||||||
{
|
{
|
||||||
use iced_runtime::platform_specific::wayland::{
|
use iced_runtime::platform_specific::wayland::CornerRadius;
|
||||||
CornerRadius,
|
use iced_runtime::platform_specific::wayland::popup::{
|
||||||
popup::{SctkPopupSettings, SctkPositioner},
|
SctkPopupSettings, SctkPositioner,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{surface::action::LiveSettings, theme::THEME};
|
use crate::surface::action::LiveSettings;
|
||||||
|
use crate::theme::THEME;
|
||||||
let overlay_offset = Point::ORIGIN - viewport.position();
|
let overlay_offset = Point::ORIGIN - viewport.position();
|
||||||
|
|
||||||
let overlay_cursor = cursor.position().unwrap_or_default() - overlay_offset;
|
let overlay_cursor = cursor.position().unwrap_or_default() - overlay_offset;
|
||||||
|
|
|
||||||
|
|
@ -941,13 +941,11 @@ where
|
||||||
let my_state = state.menu_state.clone();
|
let my_state = state.menu_state.clone();
|
||||||
|
|
||||||
if self.window_id != window::Id::NONE {
|
if self.window_id != window::Id::NONE {
|
||||||
use crate::{
|
use crate::surface::action::{LiveSettings, destroy_popup};
|
||||||
surface::action::{LiveSettings, destroy_popup},
|
use crate::widget::menu::StyleSheet;
|
||||||
widget::menu::StyleSheet,
|
use iced_runtime::platform_specific::wayland::CornerRadius;
|
||||||
};
|
use iced_runtime::platform_specific::wayland::popup::{
|
||||||
use iced_runtime::platform_specific::wayland::{
|
SctkPopupSettings, SctkPositioner,
|
||||||
CornerRadius,
|
|
||||||
popup::{SctkPopupSettings, SctkPositioner},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let Some(surface_action) = self.on_surface_action.as_ref() else {
|
let Some(surface_action) = self.on_surface_action.as_ref() else {
|
||||||
|
|
@ -2855,6 +2853,7 @@ mod tests {
|
||||||
where
|
where
|
||||||
Model<SelectionMode>: Selectable,
|
Model<SelectionMode>: Selectable,
|
||||||
SelectionMode: Default,
|
SelectionMode: Default,
|
||||||
|
Message: Clone,
|
||||||
{
|
{
|
||||||
const VERTICAL: bool = false;
|
const VERTICAL: bool = false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue