Skip to content

Commit

Permalink
Merge branch 'main' into danirabbit/styles-accent
Browse files Browse the repository at this point in the history
  • Loading branch information
zeebok authored Aug 18, 2024
2 parents a42d5cc + edf3947 commit 3be33e6
Show file tree
Hide file tree
Showing 424 changed files with 15,779 additions and 11,536 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ built for elementary OS.
## Building, Testing, and Installation

You'll need the following dependencies:
* meson >= 0.49.0
* meson >= 0.57.0
* gobject-introspection
* libgee-0.8-dev
* libgirepository1.0-dev
Expand Down
14 changes: 13 additions & 1 deletion data/granite.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,19 @@
<update_contact>contact_at_elementary.io</update_contact>

<releases>
<release version="7.5.0" date="2023-05-06" urgency="medium">
<release version="7.5.1" date="2024-06-18" urgency="medium">
<description>
<p>Improvements:</p>
<ul>
<li>Improve screen reader support for SwitchModelButton</li>
<li>Wrap long labels for SwitchModelButton</li>
<li>ValidatedEntry: set AccessibleState for validity</li>
<li>Updated translations</li>
</ul>
</description>
</release>

<release version="7.5.0" date="2024-05-06" urgency="medium">
<description>
<p>New Features:</p>
<ul>
Expand Down
11 changes: 5 additions & 6 deletions demo/Views/FormView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ public class FormView : Gtk.Box {
critical (e.message);
}

var username_label = new Gtk.Label ("Username") {
halign = Gtk.Align.START,
xalign = 0
};
username_label.add_css_class (Granite.STYLE_CLASS_H4_LABEL);

var username_entry = new Granite.ValidatedEntry () {
min_length = 8,
regex = username_regex
};

var username_label = new Granite.HeaderLabel ("Username") {
mnemonic_widget = username_entry,
secondary_text = "Must be at least 8 characters long"
};

var button = new Gtk.Button.with_label ("Submit");

margin_start = margin_end = margin_top = margin_bottom = 12;
Expand Down
2 changes: 1 addition & 1 deletion demo/Views/ModeButtonView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ModeButtonView : Gtk.Box {

var switchmodelbutton = new Granite.SwitchModelButton ("Default");

var description_switchmodelbutton = new Granite.SwitchModelButton ("With Description") {
var description_switchmodelbutton = new Granite.SwitchModelButton ("A SwitchModelButton With A Description") {
active = true,
description = "A description of additional affects related to the activation state of this switch"
};
Expand Down
2 changes: 1 addition & 1 deletion lib/Widgets/AbstractSimpleSettingsPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* a content area, and an action area.
*/

[Version (deprecated = true, deprecated_since = "7.5.0", replacement = "Switchboard.SimpleSettingsPage")]
[Version (deprecated = true, deprecated_since = "7.5.0", replacement = "Switchboard.SettingsPage")]
public abstract class Granite.SimpleSettingsPage : Granite.SettingsPage {
private Gtk.Label description_label;
private string _description;
Expand Down
14 changes: 12 additions & 2 deletions lib/Widgets/HeaderLabel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public class Granite.HeaderLabel : Gtk.Widget {
secondary_label.add_css_class (Granite.STYLE_CLASS_DIM_LABEL);
secondary_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL);

bind_property ("mnemonic-widget", secondary_label, "mnemonic-widget", SYNC_CREATE);

secondary_label.set_parent (this);
}

update_accessible_description (value);
}
}

Expand Down Expand Up @@ -80,6 +80,16 @@ public class Granite.HeaderLabel : Gtk.Widget {

bind_property ("label", label_widget, "label");
bind_property ("mnemonic-widget", label_widget, "mnemonic-widget");

notify["mnemonic-widget"].connect (() => {
update_accessible_description (secondary_text);
});
}

private void update_accessible_description (string? description) {
if (mnemonic_widget != null) {
mnemonic_widget.update_property (Gtk.AccessibleProperty.DESCRIPTION, description, -1);
}
}

~HeaderLabel () {
Expand Down
18 changes: 14 additions & 4 deletions lib/Widgets/SwitchModelButton.vala
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ public class Granite.SwitchModelButton : Gtk.ToggleButton {

construct {
var label = new Gtk.Label (text) {
ellipsize = Pango.EllipsizeMode.MIDDLE,
halign = Gtk.Align.START,
halign = START,
hexpand = true,
vexpand = true,
max_width_chars = 25,
vexpand = true,
wrap = true,
xalign = 0,
mnemonic_widget = this
};

var description_label = new Gtk.Label (null) {
Expand All @@ -68,9 +70,11 @@ public class Granite.SwitchModelButton : Gtk.ToggleButton {
};
button_switch.set_parent (this);

accessible_role = SWITCH;

bind_property ("text", label, "label");
bind_property ("description", description_label, "label");
bind_property ("active", button_switch, "active", GLib.BindingFlags.BIDIRECTIONAL);
bind_property ("active", button_switch, "active", BIDIRECTIONAL | SYNC_CREATE);

var controller = new Gtk.GestureClick ();
add_controller (controller);
Expand All @@ -80,7 +84,13 @@ public class Granite.SwitchModelButton : Gtk.ToggleButton {
button_switch.activate ();
});

notify["active"].connect (() => {
update_state (Gtk.AccessibleState.CHECKED, active, -1);
});

notify["description"].connect (() => {
update_property (Gtk.AccessibleProperty.DESCRIPTION, description, -1);

if (description == null || description == "") {
box.remove (description_revealer);
} else {
Expand Down
2 changes: 2 additions & 0 deletions lib/Widgets/ValidatedEntry.vala
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public class Granite.ValidatedEntry : Gtk.Entry {
secondary_icon_name = "process-error-symbolic";
add_css_class (Granite.STYLE_CLASS_ERROR);
}

update_state (Gtk.AccessibleState.INVALID, !is_valid, -1);
});
}
}
15 changes: 3 additions & 12 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'granite-7',
'vala', 'c',
meson_version: '>= 0.56.0',
meson_version: '>= 0.57.0',
version: '7.5.0'
)

Expand Down Expand Up @@ -52,13 +52,6 @@ libgranite_deps = [
dependency('gtk4', version: '>=4.12'),
]

icons_dir = join_paths(
get_option('prefix'),
get_option('datadir'),
'icons',
'hicolor'
)

pkgconfig = import('pkgconfig')
gnome = import('gnome')
i18n = import('i18n')
Expand All @@ -75,8 +68,6 @@ if get_option('demo')
subdir('demo')
endif

# set up post-install script to refresh the GTK icon cache
meson.add_install_script(
join_paths(meson.current_source_dir(), 'meson', 'post_install.py'),
'--iconsdir', icons_dir,
gnome.post_install(
gtk_update_icon_cache: true
)
16 changes: 0 additions & 16 deletions meson/post_install.py

This file was deleted.

3 changes: 3 additions & 0 deletions po/LINGUAS
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,6 @@ gn
an
id_ID
frp
ca@valencia
en_ZA
pap
2 changes: 1 addition & 1 deletion po/aa.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/ab.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/ace.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: granite\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
Expand Down
2 changes: 1 addition & 1 deletion po/ae.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/af.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: granite\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"PO-Revision-Date: 2015-12-04 01:36+0000\n"
"Last-Translator: Launchpad Translations Administrators <Unknown>\n"
"Language-Team: Afrikaans <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/ak.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: granite\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"PO-Revision-Date: 2016-10-08 17:19+0000\n"
"Last-Translator: aberba <[email protected]>\n"
"Language-Team: Akan <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/am.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: granite\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"PO-Revision-Date: 2021-10-01 14:36+0000\n"
"Last-Translator: carnage-mode <[email protected]>\n"
"Language-Team: Amharic <https://l10n.elementary.io/projects/desktop/granite/"
Expand Down
2 changes: 1 addition & 1 deletion po/an.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: granite\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"PO-Revision-Date: 2021-08-30 15:00+0000\n"
"Last-Translator: Muhammad Al-Jayyousi <[email protected]>\n"
"Language-Team: Arabic <https://l10n.elementary.io/projects/desktop/granite/"
Expand Down
2 changes: 1 addition & 1 deletion po/as.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/ast.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/av.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/ay.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/az.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: granite\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"PO-Revision-Date: 2018-02-19 16:04+0000\n"
"Last-Translator: Вагиф Кязым <[email protected]>\n"
"Language-Team: Azerbaijani <https://weblate.elementary.io/projects/desktop/"
Expand Down
2 changes: 1 addition & 1 deletion po/ba.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/be.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: granite\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"PO-Revision-Date: 2015-12-04 01:36+0000\n"
"Last-Translator: Launchpad Translations Administrators <Unknown>\n"
"Language-Team: Belarusian <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/bg.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: granite\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"PO-Revision-Date: 2016-10-27 12:56+0000\n"
"Last-Translator: Адмирал АнимЕ <Unknown>\n"
"Language-Team: Bulgarian <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/bh.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/bi.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
2 changes: 1 addition & 1 deletion po/bm.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 18:11+0000\n"
"POT-Creation-Date: 2024-07-31 17:51+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Expand Down
Loading

0 comments on commit 3be33e6

Please sign in to comment.