Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rugby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bruce Cowan
Rugby
Commits
a835727f
Verified
Commit
a835727f
authored
2 years ago
by
Bruce Cowan
Browse files
Options
Downloads
Patches
Plain Diff
Use Adwaita classes where possible
parent
e5a577dc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#3524
passed
2 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
data/window.blp
+32
-33
32 additions, 33 deletions
data/window.blp
src/rugby-app-window.c
+3
-3
3 additions, 3 deletions
src/rugby-app-window.c
src/rugby-app-window.h
+4
-3
4 additions, 3 deletions
src/rugby-app-window.h
with
39 additions
and
39 deletions
data/window.blp
+
32
−
33
View file @
a835727f
...
...
@@ -5,51 +5,49 @@
using Gtk 4.0;
using Adw 1;
template RugbyAppWindow : ApplicationWindow {
template RugbyAppWindow :
Adw.
ApplicationWindow {
title: "Rugby";
default-height: 600;
default-width: 400;
[titlebar]
HeaderBar {
SpinButton scorespin {
adjustment: Adjustment {
step-increment: 1;
upper: 200;
};
focusable: true;
tooltip-text: "Score";
}
Box {
orientation: vertical;
[title]
Label {
styles ["title"]
Adw.HeaderBar {
SpinButton scorespin {
adjustment: Adjustment {
step-increment: 1;
upper: 200;
};
focusable: true;
tooltip-text: "Score";
}
label: "Rugby";
[end]
MenuButton menu_button {
direction: none;
menu-model: app_menu;
}
}
[end]
MenuButton menu_button {
direction: none;
menu-model: app_menu;
}
}
ScrolledWindow {
vexpand: true;
ScrolledWindow {
Adw.ClampScrollable {
maximum-size: 600;
Adw.ClampScrollable {
maximum-size: 600;
ListView listview {
styles ["rich-list"]
ListView listview {
styles ["rich-list"]
model: NoSelection {
model: .RugbyListStore {
score: bind scorespin.value;
model: NoSelection {
model: .RugbyListStore {
score: bind scorespin.value;
};
};
};
factory: BuilderListItemFactory {
resource: "/uk/me/bcowan/rugby/score-item.ui"
;
}
;
factory: BuilderListItemFactory {
resource: "/uk/me/bcowan/rugby/score-item.ui";
}
;
}
}
}
}
...
...
@@ -63,3 +61,4 @@ menu app_menu {
item ("_About Rugby", "app.about")
}
}
This diff is collapsed.
Click to expand it.
src/rugby-app-window.c
+
3
−
3
View file @
a835727f
/*
* SPDX-FileCopyrightText: 2017-202
1
Bruce Cowan <bruce@bcowan.me.uk>
* SPDX-FileCopyrightText: 2017-202
2
Bruce Cowan <bruce@bcowan.me.uk>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
...
...
@@ -14,10 +14,10 @@
struct
_RugbyAppWindow
{
Gtk
ApplicationWindow
parent
;
Adw
ApplicationWindow
parent
;
};
G_DEFINE_TYPE
(
RugbyAppWindow
,
rugby_app_window
,
GTK
_TYPE_APPLICATION_WINDOW
)
G_DEFINE_TYPE
(
RugbyAppWindow
,
rugby_app_window
,
ADW
_TYPE_APPLICATION_WINDOW
)
static
char
*
item_tooltip_cb
(
GtkListItem
*
item
)
...
...
This diff is collapsed.
Click to expand it.
src/rugby-app-window.h
+
4
−
3
View file @
a835727f
/*
* SPDX-FileCopyrightText: 2017 Bruce Cowan <bruce@bcowan.me.uk>
* SPDX-FileCopyrightText: 2017-2022 Bruce Cowan <bruce@bcowan.me.uk>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#pragma once
#include
<
gtk/gtk
.h>
#include
<
adwaita
.h>
G_BEGIN_DECLS
#define RUGBY_TYPE_APP_WINDOW (rugby_app_window_get_type())
G_DECLARE_FINAL_TYPE
(
RugbyAppWindow
,
rugby_app_window
,
RUGBY
,
APP_WINDOW
,
Gtk
ApplicationWindow
)
G_DECLARE_FINAL_TYPE
(
RugbyAppWindow
,
rugby_app_window
,
RUGBY
,
APP_WINDOW
,
Adw
ApplicationWindow
)
RugbyAppWindow
*
rugby_app_window_new
(
GtkApplication
*
app
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment