[polari] roomList: Replace markup with typography styles
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] roomList: Replace markup with typography styles
- Date: Sat, 19 Mar 2022 15:19:35 +0000 (UTC)
commit acfe30b363e7b7a90e190ed35b7228f009baab49
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Mar 19 00:08:43 2022 +0100
roomList: Replace markup with typography styles
libadwaita defines a set of style classes as part of its API, including
a set of typography styles for labels. Use those instead of pango markup
for better platform consistency.
Part-of: <https://gitlab.gnome.org/GNOME/polari/-/merge_requests/250>
src/roomList.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/roomList.js b/src/roomList.js
index 8e45f578..cfcb5099 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -494,11 +494,10 @@ class RoomListHeader extends Gtk.Widget {
if (this._spinner.spinning)
this._spinnerActivationTime = GLib.get_monotonic_time();
- this._popoverTitle.use_markup = isError;
- this._popoverStatus.use_markup = !isError;
-
if (!isError) {
this._popoverStatus.add_css_class('dim-label');
+ this._popoverStatus.add_css_class('caption');
+ this._popoverTitle.remove_css_class('heading');
let params = this._account.dup_parameters_vardict().deep_unpack();
let server = params['server'].deep_unpack();
@@ -508,11 +507,13 @@ class RoomListHeader extends Gtk.Widget {
server address, e.g. "GNOME (irc.gnome.org)" */
let fullTitle = vprintf(_('%s (%s)'), accountName, server);
this._popoverTitle.label = accountName === server ? accountName : fullTitle;
- this._popoverStatus.label = `<sup>${this._getStatusLabel()}<${'/'}sup>`;
+ this._popoverStatus.label = this._getStatusLabel();
} else {
this._popoverStatus.remove_css_class('dim-label');
+ this._popoverStatus.remove_css_class('caption');
+ this._popoverTitle.add_css_class('heading');
- this._popoverTitle.label = `<b>${_('Connection Problem')}<${'/'}b>`;
+ this._popoverTitle.label = _('Connection Problem');
this._popoverStatus.label = this._getErrorLabel();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]