Split template files. Added full hours support
This commit is contained in:
135
data/ui/main.blp
135
data/ui/main.blp
@@ -5,7 +5,7 @@ using Shumate 1.0;
|
||||
Adw.ApplicationWindow mainWindow {
|
||||
title: "Wince";
|
||||
default-width: 700;
|
||||
default-height: 500;
|
||||
default-height: 700;
|
||||
|
||||
Gtk.Box {
|
||||
orientation: vertical;
|
||||
@@ -48,97 +48,102 @@ Adw.ApplicationWindow mainWindow {
|
||||
can-navigate-back: true;
|
||||
visible: false;
|
||||
|
||||
Gtk.ScrolledWindow scrollWindow {
|
||||
Gtk.ScrolledWindow resultsScroll {
|
||||
vexpand: true;
|
||||
width-request: 300;
|
||||
|
||||
Gtk.ListBox searchResults {}
|
||||
}
|
||||
|
||||
Adw.Clamp detailsClamp {
|
||||
width-request: 300;
|
||||
maximum-size: 450;
|
||||
tightening-threshold: 400;
|
||||
Gtk.ScrolledWindow detailsScroll {
|
||||
vexpand: true;
|
||||
|
||||
Gtk.Box detailsBox {
|
||||
orientation: vertical;
|
||||
visible: false;
|
||||
margin-start: 14;
|
||||
margin-end: 14;
|
||||
Adw.Clamp {
|
||||
width-request: 300;
|
||||
maximum-size: 450;
|
||||
margin-end: 12;
|
||||
tightening-threshold: 400;
|
||||
|
||||
Gtk.Button detailsBack {
|
||||
Gtk.Box detailsBox {
|
||||
orientation: vertical;
|
||||
visible: false;
|
||||
hexpand: false;
|
||||
label: "Back to results";
|
||||
margin-bottom: 8;
|
||||
}
|
||||
margin-start: 14;
|
||||
|
||||
Gtk.Label detailsTitle {
|
||||
halign: start;
|
||||
styles ["title-1"]
|
||||
}
|
||||
|
||||
Gtk.Box {
|
||||
orientation: horizontal;
|
||||
spacing: 12;
|
||||
|
||||
Gtk.Label detailsIsOpen {
|
||||
halign: start;
|
||||
Gtk.Button detailsBack {
|
||||
visible: false;
|
||||
hexpand: false;
|
||||
label: "Back to results";
|
||||
margin-bottom: 8;
|
||||
}
|
||||
|
||||
Gtk.Label detailsCurrentHours {
|
||||
Gtk.Label detailsTitle {
|
||||
halign: start;
|
||||
styles ["title-1"]
|
||||
}
|
||||
|
||||
Gtk.Label detailsPricing {
|
||||
halign: start;
|
||||
}
|
||||
}
|
||||
Gtk.Box {
|
||||
orientation: horizontal;
|
||||
spacing: 12;
|
||||
|
||||
Gtk.ListBox {
|
||||
styles ["boxed-list"]
|
||||
selection-mode: none;
|
||||
margin-top: 8;
|
||||
hexpand: true;
|
||||
|
||||
Gtk.ListBoxRow {
|
||||
Gtk.Label detailsAddress {
|
||||
Gtk.Label detailsIsOpen {
|
||||
halign: start;
|
||||
margin-start: 12;
|
||||
margin-top: 12;
|
||||
margin-bottom: 12;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ListBoxRow {
|
||||
Gtk.Label detailsPhone {
|
||||
Gtk.Label detailsCurrentHours {
|
||||
halign: start;
|
||||
margin-start: 12;
|
||||
margin-top: 12;
|
||||
margin-bottom: 12;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ListBoxRow {
|
||||
Gtk.LinkButton detailsUrl {
|
||||
label: "View on yelp";
|
||||
Gtk.Label detailsPricing {
|
||||
halign: start;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.Label {
|
||||
styles ["heading"]
|
||||
halign: start;
|
||||
label: "Hours";
|
||||
margin-top: 16;
|
||||
}
|
||||
Gtk.ListBox {
|
||||
styles ["boxed-list"]
|
||||
selection-mode: none;
|
||||
margin-top: 8;
|
||||
hexpand: true;
|
||||
|
||||
Gtk.ListBox detailsHoursBox {
|
||||
styles ["boxed-list"]
|
||||
selection-mode: none;
|
||||
margin-top: 8;
|
||||
hexpand: true;
|
||||
Gtk.ListBoxRow {
|
||||
Gtk.Label detailsAddress {
|
||||
halign: start;
|
||||
margin-start: 12;
|
||||
margin-top: 12;
|
||||
margin-bottom: 12;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ListBoxRow {
|
||||
Gtk.Label detailsPhone {
|
||||
halign: start;
|
||||
margin-start: 12;
|
||||
margin-top: 12;
|
||||
margin-bottom: 12;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ListBoxRow {
|
||||
Gtk.LinkButton detailsUrl {
|
||||
label: "View on yelp";
|
||||
halign: start;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.Label {
|
||||
styles ["heading"]
|
||||
halign: start;
|
||||
label: "Hours";
|
||||
margin-top: 16;
|
||||
}
|
||||
|
||||
Gtk.ListBox detailsHoursBox {
|
||||
styles ["boxed-list"]
|
||||
selection-mode: none;
|
||||
margin-top: 8;
|
||||
margin-bottom: 8;
|
||||
hexpand: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,4 @@ template Wince-BusinessRow : Gtk.ListBoxRow {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
22
data/ui/templates/hourrow.blp
Normal file
22
data/ui/templates/hourrow.blp
Normal file
@@ -0,0 +1,22 @@
|
||||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template Wince-HourRow : Gtk.ListBoxRow {
|
||||
Gtk.Box {
|
||||
orientation: horizontal;
|
||||
margin-start: 12;
|
||||
margin-end: 12;
|
||||
margin-top: 12;
|
||||
margin-bottom: 12;
|
||||
hexpand: true;
|
||||
|
||||
Gtk.Label dayOfWeek {
|
||||
halign: start;
|
||||
}
|
||||
|
||||
Gtk.Label hours {
|
||||
halign: end;
|
||||
hexpand: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
<gresources>
|
||||
<gresource prefix="/wince">
|
||||
<file compressed="true" preprocess="xml-stripblanks">ui/compiled/main.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">ui/compiled/templates.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">ui/compiled/templates/businessrow.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">ui/compiled/templates/hourrow.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
||||
Reference in New Issue
Block a user