-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #554 from mjakeman/oscfdezdz/search-row-expression…
…-lookup search-row: Use GtkExpression lookups in Blueprint
- Loading branch information
Showing
2 changed files
with
88 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,91 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
template $ExmSearchRow : Gtk.ListBoxRow { | ||
styles ["search-row"] | ||
|
||
activatable: true; | ||
|
||
Gtk.Box header { | ||
styles ["header"] | ||
hexpand: true; | ||
spacing: 10; | ||
|
||
Gtk.Grid { | ||
hexpand: true; | ||
column-spacing: 10; | ||
|
||
Gtk.Box { | ||
hexpand: true; | ||
orientation: vertical; | ||
valign: center; | ||
|
||
Gtk.Label title { | ||
styles ["title"] | ||
ellipsize: end; | ||
xalign: 0; | ||
} | ||
|
||
Gtk.Label subtitle { | ||
styles ["subtitle"] | ||
ellipsize: end; | ||
xalign: 0; | ||
} | ||
|
||
layout { | ||
row: 0; | ||
column: 1; | ||
} | ||
} | ||
|
||
Gtk.Label description_label { | ||
styles ["dim-label"] | ||
|
||
margin-top: 5; | ||
single-line-mode: true; | ||
xalign: 0; | ||
wrap: true; | ||
wrap-mode: word_char; | ||
ellipsize: end; | ||
lines: 2; | ||
|
||
layout { | ||
row: 1; | ||
column: 1; | ||
} | ||
} | ||
} | ||
|
||
$ExmInstallButton install_btn { | ||
valign: center; | ||
halign: end; | ||
} | ||
|
||
Gtk.Image { | ||
styles ["expander-row-arrow"] | ||
|
||
valign: center; | ||
halign: end; | ||
|
||
icon-name: "go-next-symbolic"; | ||
} | ||
} | ||
template $ExmSearchRow: Gtk.ListBoxRow { | ||
styles [ | ||
"search-row" | ||
] | ||
|
||
activatable: true; | ||
action-name: "win.show-detail"; | ||
|
||
Gtk.Box header { | ||
styles [ | ||
"header" | ||
] | ||
|
||
hexpand: true; | ||
spacing: 10; | ||
|
||
Gtk.Grid { | ||
hexpand: true; | ||
column-spacing: 10; | ||
|
||
Gtk.Box { | ||
hexpand: true; | ||
orientation: vertical; | ||
valign: center; | ||
|
||
Gtk.Label title { | ||
styles [ | ||
"title" | ||
] | ||
|
||
ellipsize: end; | ||
xalign: 0; | ||
label: bind template.search-result as <$ExmSearchResult>.name; | ||
} | ||
|
||
Gtk.Label subtitle { | ||
styles [ | ||
"subtitle" | ||
] | ||
|
||
ellipsize: end; | ||
xalign: 0; | ||
label: bind template.search-result as <$ExmSearchResult>.creator; | ||
} | ||
|
||
layout { | ||
row: 0; | ||
column: 1; | ||
} | ||
} | ||
|
||
Gtk.Label description_label { | ||
styles [ | ||
"dim-label" | ||
] | ||
|
||
margin-top: 5; | ||
single-line-mode: true; | ||
xalign: 0; | ||
wrap: true; | ||
wrap-mode: word_char; | ||
ellipsize: end; | ||
lines: 2; | ||
label: bind template.search-result as <$ExmSearchResult>.description; | ||
|
||
layout { | ||
row: 1; | ||
column: 1; | ||
} | ||
} | ||
} | ||
|
||
$ExmInstallButton install_btn { | ||
valign: center; | ||
halign: end; | ||
} | ||
|
||
Gtk.Image { | ||
styles [ | ||
"expander-row-arrow" | ||
] | ||
|
||
valign: center; | ||
halign: end; | ||
icon-name: "go-next-symbolic"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters