window: Show flat headerbar in empty state
This commit is contained in:
parent
7d165d6230
commit
cae9d54218
2 changed files with 8 additions and 1 deletions
|
|
@ -85,6 +85,11 @@
|
||||||
<lookup name="fullscreened">LpWindow</lookup>
|
<lookup name="fullscreened">LpWindow</lookup>
|
||||||
<lookup name="active">properties_button</lookup>
|
<lookup name="active">properties_button</lookup>
|
||||||
<lookup name="active">primary_menu</lookup>
|
<lookup name="active">primary_menu</lookup>
|
||||||
|
<lookup name="image">
|
||||||
|
<lookup name="current-page">
|
||||||
|
image_view
|
||||||
|
</lookup>
|
||||||
|
</lookup>
|
||||||
</closure>
|
</closure>
|
||||||
</binding>
|
</binding>
|
||||||
<binding name="extend-content-to-top-edge">
|
<binding name="extend-content-to-top-edge">
|
||||||
|
|
|
||||||
|
|
@ -966,8 +966,10 @@ impl LpWindow {
|
||||||
fullscreened: bool,
|
fullscreened: bool,
|
||||||
show_properties: bool,
|
show_properties: bool,
|
||||||
show_menu: bool,
|
show_menu: bool,
|
||||||
|
current_image: Option<LpImage>,
|
||||||
) -> adw::ToolbarStyle {
|
) -> 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
|
adw::ToolbarStyle::Flat
|
||||||
} else {
|
} else {
|
||||||
// Use the border variant of raised to avoid shadows over images
|
// Use the border variant of raised to avoid shadows over images
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue