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

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);