window: Show flat headerbar in empty state

This commit is contained in:
Sophie Herold 2023-08-31 15:50:28 +02:00
parent 7d165d6230
commit cae9d54218
2 changed files with 8 additions and 1 deletions

View file

@ -966,8 +966,10 @@ impl LpWindow {
fullscreened: bool,
show_properties: bool,
show_menu: bool,
current_image: Option<LpImage>,
) -> adw::ToolbarStyle {
if self.extend_to_top(fullscreened, show_properties, show_menu) {
// Flat headerbar for empty state and fullscreen
if current_image.is_none() || self.extend_to_top(fullscreened, show_properties, show_menu) {
adw::ToolbarStyle::Flat
} else {
// Use the border variant of raised to avoid shadows over images