-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into gamepads-demo
- Loading branch information
Showing
194 changed files
with
2,590 additions
and
741 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
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
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
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -64,7 +64,7 @@ Box { | |
|
||
[end] | ||
Button end_widget { | ||
icon-name: "padlock2-symbolic"; | ||
icon-name: "input-keyboard-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#! /usr/bin/env -S vala workbench.vala --pkg libadwaita-1 | ||
|
||
public void main () { | ||
var demo = (Adw.StatusPage) workbench.builder.get_object ("demo"); | ||
|
||
var demo_group = new SimpleActionGroup (); | ||
demo.insert_action_group ("demo", demo_group); | ||
|
||
// Action with no state or parameters | ||
var simple_action = new SimpleAction ("simple", null); | ||
simple_action.activate.connect (() => { | ||
message (@"$(simple_action.name) action activated"); | ||
}); | ||
demo_group.add_action (simple_action); | ||
|
||
// Action with parameter | ||
var bookmarks_action = new SimpleAction ("open-bookmarks", new GLib.VariantType ("s")); | ||
bookmarks_action.activate.connect ((action, parameter) => { | ||
message (@"$(action.name) activated with $(parameter.get_string())"); | ||
}); | ||
demo_group.add_action (bookmarks_action); | ||
|
||
// Action with state | ||
var toggle_action = new SimpleAction.stateful ("toggle", null, new Variant.boolean (false)); | ||
toggle_action.notify.connect ((action, state) => { | ||
bool b = toggle_action.state.get_boolean (); | ||
message (@"$(toggle_action.name) action set to " + (b ? "true" : "false")); | ||
}); | ||
|
||
demo_group.add_action (toggle_action); | ||
|
||
// Action with state and parameter | ||
var scale_action = new SimpleAction.stateful ("scale", new VariantType ("s"), new Variant.string ("100%")); | ||
|
||
scale_action.notify.connect ((action) => { | ||
message (@"$(scale_action.name) action set to $(scale_action.state.get_string())"); | ||
}); | ||
|
||
demo_group.add_action (scale_action); | ||
|
||
var text = (Gtk.Label) workbench.builder.get_object ("text"); | ||
var alignment_action = new PropertyAction ("text-align", text, "halign"); | ||
demo_group.add_action (alignment_action); | ||
} |
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
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
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
Oops, something went wrong.