fix(desktop): header bar styling

This effectively reverts commit 19c2cefd8a.
The changes don't seem to be necessary anymore. and this ensures the header bar matches the theme.
This commit is contained in:
Vukašin Vojinović 2025-09-08 18:28:17 +02:00 committed by Jeremy Soller
parent 3ee1a07f09
commit f0cce9a81f
4 changed files with 28 additions and 66 deletions

46
Cargo.lock generated
View file

@ -1495,8 +1495,8 @@ dependencies = [
"jxl-oxide",
"libc",
"libcosmic",
"liblzma",
"log",
"lzma-rust2",
"md-5",
"mime_guess",
"notify-debouncer-full",
@ -3932,9 +3932,9 @@ dependencies = [
[[package]]
name = "indexmap"
version = "2.11.0"
version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9"
checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921"
dependencies = [
"equivalent",
"hashbrown 0.15.5",
@ -4530,26 +4530,6 @@ dependencies = [
"windows-targets 0.53.3",
]
[[package]]
name = "liblzma"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10bf66f4598dc77ff96677c8e763655494f00ff9c1cf79e2eb5bb07bc31f807d"
dependencies = [
"liblzma-sys",
]
[[package]]
name = "liblzma-sys"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01b9596486f6d60c3bbe644c0e1be1aa6ccc472ad630fe8927b456973d7cb736"
dependencies = [
"cc",
"libc",
"pkg-config",
]
[[package]]
name = "libm"
version = "0.2.15"
@ -4922,7 +4902,7 @@ dependencies = [
"cfg_aliases 0.1.1",
"codespan-reporting",
"hexf-parse",
"indexmap 2.11.0",
"indexmap 2.11.1",
"log",
"rustc-hash 1.1.0",
"spirv",
@ -5502,11 +5482,11 @@ dependencies = [
[[package]]
name = "ordermap"
version = "0.5.9"
version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fd6fedcd996c8c97932075cc3811d83f53280f48d5620e4e3cab7f6a12678c4"
checksum = "0dcd63f1ae4b091e314a26627c467dd8810d674ba798abc0e566679955776c63"
dependencies = [
"indexmap 2.11.0",
"indexmap 2.11.1",
"serde",
]
@ -6627,7 +6607,7 @@ version = "1.0.143"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
dependencies = [
"indexmap 2.11.0",
"indexmap 2.11.1",
"itoa",
"memchr",
"ryu",
@ -6664,7 +6644,7 @@ dependencies = [
"chrono",
"hex",
"indexmap 1.9.3",
"indexmap 2.11.0",
"indexmap 2.11.1",
"schemars 0.9.0",
"schemars 1.0.4",
"serde",
@ -7416,7 +7396,7 @@ version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [
"indexmap 2.11.0",
"indexmap 2.11.1",
"toml_datetime",
"winnow 0.5.40",
]
@ -7427,7 +7407,7 @@ version = "0.22.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
dependencies = [
"indexmap 2.11.0",
"indexmap 2.11.1",
"serde",
"serde_spanned",
"toml_datetime",
@ -8086,7 +8066,7 @@ dependencies = [
"bitflags 2.9.4",
"cfg_aliases 0.1.1",
"document-features",
"indexmap 2.11.0",
"indexmap 2.11.1",
"log",
"naga",
"once_cell",
@ -9324,7 +9304,7 @@ dependencies = [
"flate2",
"getrandom 0.3.3",
"hmac",
"indexmap 2.11.0",
"indexmap 2.11.1",
"lzma-rust2",
"memchr",
"pbkdf2",

View file

@ -51,8 +51,8 @@ xdg-mime = { git = "https://github.com/ellieplayswow/xdg-mime-rs", branch = "fea
bzip2 = { version = "0.6", optional = true } #TODO: replace with pure Rust crate
flate2 = "1.1"
tar = "0.4.44"
liblzma = { version = "0.4.4", optional = true } #TODO: replace with pure Rust crate
ordermap = { version = "0.5.9", features = ["serde"] }
lzma-rust2 = { version = "0.13", optional = true }
ordermap = { version = "0.5.10", features = ["serde"] }
# Internationalization
i18n-embed = { version = "0.16", features = [
"fluent-system",
@ -92,10 +92,10 @@ default = [
"desktop",
"gvfs",
"io-uring",
"lzma-rust2",
"notify",
"wgpu",
"wayland",
"liblzma",
]
dbus-config = ["libcosmic/dbus-config"]
desktop = [

View file

@ -301,7 +301,6 @@ impl MenuAction for NavMenuAction {
pub enum Message {
AddToSidebar(Option<Entity>),
AppTheme(AppTheme),
CloseId(window::Id),
CloseToast(widget::ToastId),
Compress(Option<Entity>),
Config(Config),
@ -314,7 +313,6 @@ pub enum Message {
DesktopDialogs(bool),
DialogCancel,
DialogComplete,
DragId(window::Id),
Eject,
FileDialogMessage(DialogMessage),
DialogPush(DialogPage),
@ -2642,7 +2640,7 @@ impl Application for App {
}
Message::DesktopViewOptions => {
let mut settings = window::Settings {
decorations: false,
decorations: true,
min_size: Some(Size::new(360.0, 180.0)),
resizable: true,
size: Size::new(480.0, 444.0),
@ -3540,7 +3538,7 @@ impl Application for App {
let mut commands = Vec::with_capacity(selected_paths.len());
for path in selected_paths {
let mut settings = window::Settings {
decorations: false,
decorations: true,
min_size: Some(Size::new(360.0, 180.0)),
resizable: true,
size: Size::new(480.0, 600.0),
@ -4678,12 +4676,6 @@ impl Application for App {
}
}
}
Message::CloseId(id) => {
return window::close(id);
}
Message::DragId(id) => {
return window::drag(id);
}
Message::NetworkDriveOpenEntityAfterMount { entity } => {
return self.on_nav_select(entity);
}
@ -5761,21 +5753,11 @@ impl Application for App {
}
};
widget::container(
widget::column::column()
.push(Element::from(
widget::header_bar()
.on_close(Message::CloseId(id))
.on_drag(Message::DragId(id))
.build(),
))
.push(widget::scrollable(content))
.width(Length::Fill),
)
.width(Length::Fill)
.height(Length::Fill)
.class(theme::Container::WindowBackground)
.into()
widget::container(widget::scrollable(content))
.width(Length::Fill)
.height(Length::Fill)
.class(theme::Container::WindowBackground)
.into()
}
fn system_theme_update(

View file

@ -24,9 +24,9 @@ pub const SUPPORTED_ARCHIVE_TYPES: &[&str] = &[
"application/x-bzip2",
#[cfg(feature = "bzip2")]
"application/x-bzip2-compressed-tar",
#[cfg(feature = "liblzma")]
#[cfg(feature = "lzma-rust2")]
"application/x-xz",
#[cfg(feature = "liblzma")]
#[cfg(feature = "lzma-rust2")]
"application/x-xz-compressed-tar",
];
@ -86,11 +86,11 @@ pub fn extract(
.map(tar::Archive::new)
.and_then(|mut archive| archive.unpack(new_dir))
.map_err(|e| OperationError::from_err(e, controller))?,
#[cfg(feature = "liblzma")]
#[cfg(feature = "lzma-rust2")]
"application/x-xz" | "application/x-xz-compressed-tar" => {
OpReader::new(path, controller.clone())
.map(io::BufReader::new)
.map(liblzma::read::XzDecoder::new)
.map(|reader| lzma_rust2::XzReader::new(reader, true))
.map(tar::Archive::new)
.and_then(|mut archive| archive.unpack(new_dir))
.map_err(|e| OperationError::from_err(e, controller))?
@ -151,7 +151,7 @@ fn zip_extract<R: io::Read + io::Seek, P: AsRef<Path>>(
}?;
let filepath = file
.enclosed_name()
.ok_or(ZipError::InvalidArchive("Invalid file path"))?;
.ok_or(ZipError::InvalidArchive("Invalid file path".into()))?;
let outpath = directory.as_ref().join(filepath);