Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
fd0fdd22 by wurstsalat at 2024-07-06T23:41:38+02:00
change: Remove gajim-url theme parameter
URL color can be set via GTK themes
Closes #11894
- - - - -
4 changed files:
- gajim/data/style/default-dark.css
- gajim/data/style/default.css
- gajim/gtk/themes.py
- gajim/gtk/util.py
Changes:
=====================================
gajim/data/style/default-dark.css
=====================================
@@ -22,9 +22,6 @@ .gajim-call-message {
.gajim-mention-highlight {
background: rgb(100, 50, 10);
}
-.gajim-url {
- color: rgb(60, 135, 220);
-}
.gajim-user-disconnected {
color: rgb(230, 170, 170);
}
=====================================
gajim/data/style/default.css
=====================================
@@ -30,9 +30,6 @@ .gajim-command-output {
.gajim-mention-highlight {
background: rgb(255, 215, 194);
}
-.gajim-url {
- color: rgb(30, 75, 135);
-}
.gajim-user-disconnected {
color: rgb(230, 170, 170);
}
=====================================
gajim/gtk/themes.py
=====================================
@@ -45,10 +45,6 @@ class StyleOption(NamedTuple):
'.gajim-conversation-text',
StyleAttr.COLOR),
- StyleOption(_('Conversation: URL Color'),
- '.gajim-url',
- StyleAttr.COLOR),
-
StyleOption(_('Conversation: Nickname Color (Incoming)'),
'.gajim-incoming-nickname',
StyleAttr.COLOR),
=====================================
gajim/gtk/util.py
=====================================
@@ -38,7 +38,6 @@
from gajim.common.const import AvatarSize
from gajim.common.const import Display
from gajim.common.const import LOCATION_DATA
-from gajim.common.const import StyleAttr
from gajim.common.ged import EventHelper as CommonEventHelper
from gajim.common.helpers import format_idle_time
from gajim.common.helpers import URL_REGEX
@@ -656,18 +655,13 @@ def make_href_markup(string: str | None) -> str:
if not string:
return ''
- url_color = app.css_config.get_value('.gajim-url', StyleAttr.COLOR)
- assert isinstance(url_color, str)
- color = convert_rgb_to_hex(url_color)
-
string = GLib.markup_escape_text(string)
def _to_href(match: Match[str]) -> str:
url = match.group()
if '://' not in url:
- url = 'https://' + url
- return (f'<a href="{url}"><span foreground="{color}">'
- f'{match.group()}</span></a>')
+ url = f'https://{url}'
+ return f'<a href="{url}">{match.group()}</a>'
return URL_REGEX.sub(_to_href, string)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/fd0fdd2236a448bdda71d135f30b5b295df04353
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/fd0fdd2236a448bdda71d135f30b5b295df04353
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]