# HG changeset patch # User Goffi # Date 1729975477 -7200 # Node ID 196483685a638a0e8abd2d7737f89a4409d4fbb9 # Parent f316c7f1990920077289657ec4dc6989fd8589e6 Use Font-Awesome instead of Fontello, following change in Libervia Media. diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/core/cagou_main.py --- a/libervia/desktop_kivy/core/cagou_main.py Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/core/cagou_main.py Sat Oct 26 22:44:37 2024 +0200 @@ -138,6 +138,11 @@ options=list(C.XMLUI_DATA_LVLS)) symbol = properties.StringProperty() action = properties.ObjectProperty() + level2symbol = { + C.XMLUI_DATA_LVL_INFO: "circle-info", + C.XMLUI_DATA_LVL_WARNING: "triangle-exclamation", + C.XMLUI_DATA_LVL_ERROR: "circle-exclamation" + } def on_press(self): if self.action is not None: diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/core/common.py --- a/libervia/desktop_kivy/core/common.py Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/core/common.py Sat Oct 26 22:44:37 2024 +0200 @@ -175,13 +175,23 @@ def __init__(self, **kwargs): if self.symbol_map is None: - with open(G.host.app.expand('{media}/fonts/fontello/config.json')) as f: - fontello_conf = json.load(f) - Symbol.symbol_map = {g['css']:g['code'] for g in fontello_conf['glyphs']} + with open( + G.host.app.expand('{media}/fonts/fontawesome/metadata/icons.json') + ) as f: + font_conf = json.load(f) + Symbol.symbol_map = { + name:int(data["unicode"], 16) + for name, data in font_conf.items() + } super(Symbol, self).__init__(**kwargs) def on_symbol(self, instance, symbol): + if symbol.startswith("regular "): + symbol = symbol[8:] + self.font_name = G.host.app.expand( + "{media}/fonts/fontawesome/webfonts/fa-regular-400.ttf" + ) try: code = self.symbol_map[symbol] except KeyError: diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/core/common_widgets.py --- a/libervia/desktop_kivy/core/common_widgets.py Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/core/common_widgets.py Sat Oct 26 22:44:37 2024 +0200 @@ -111,15 +111,15 @@ def get_symbol(self): if self.identities.type == 'desktop': - return 'desktop' + return 'display' elif self.identities.type == 'phone': - return 'mobile' + return 'mobile-screen-button' elif self.identities.type == 'web': return 'globe' elif self.identities.type == 'console': return 'terminal' else: - return 'desktop' + return 'display' def do_item_action(self, touch): pass diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/core/share_widget.py --- a/libervia/desktop_kivy/core/share_widget.py Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/core/share_widget.py Sat Oct 26 22:44:37 2024 +0200 @@ -37,7 +37,7 @@ "name": _("share"), "main": "Share", "description": _("share a file"), - "icon_symbol": "share", + "icon_symbol": "share-nodes", } diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/kv/cagou_widget.kv --- a/libervia/desktop_kivy/kv/cagou_widget.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/kv/cagou_widget.kv Sat Oct 26 22:44:37 2024 +0200 @@ -46,7 +46,7 @@ : ActionSymbol: - symbol: "dot-3-vert" + symbol: "ellipsis-vertical" size_hint: None, 1 width: self.height Label: diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/kv/common.kv --- a/libervia/desktop_kivy/kv/common.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/kv/common.kv Sat Oct 26 22:44:37 2024 +0200 @@ -100,7 +100,7 @@ : width: dp(35) height: dp(35) - font_name: app.expand('{media}/fonts/fontello/font/fontello.ttf') + font_name: app.expand('{media}/fonts/fontawesome/webfonts/fa-solid-900.ttf') text_size: self.size font_size: dp(30) halign: 'center' diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/kv/menu.kv --- a/libervia/desktop_kivy/kv/menu.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/kv/menu.kv Sat Oct 26 22:44:37 2024 +0200 @@ -69,7 +69,7 @@ on_state: root.update_transfer_info() SymbolToggleLabel id: send_btn - symbol: "loop-alt" + symbol: "repeat" text: _(u"send") group: "transfer" Widget: diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/kv/root_widget.kv --- a/libervia/desktop_kivy/kv/root_widget.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/kv/root_widget.kv Sat Oct 26 22:44:37 2024 +0200 @@ -50,7 +50,7 @@ padding_y: dp(10) valign: 'top' haligh: 'right' - symbol: root.symbol or root.level + symbol: root.symbol or root.level2symbol[root.level] color: C.COLOR_PRIM_LIGHT if root.symbol is None else \ {C.XMLUI_DATA_LVL_INFO: app.c_prim_light,\ diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/kv/share_widget.kv --- a/libervia/desktop_kivy/kv/share_widget.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/kv/share_widget.kv Sat Oct 26 22:44:37 2024 +0200 @@ -108,7 +108,7 @@ height: dp(100) Widget: SymbolButtonLabel: - symbol: "doc" + symbol: "regular file" text: Path(root.path).name Widget: diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/plugins/plugin_wid_blog.kv --- a/libervia/desktop_kivy/plugins/plugin_wid_blog.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/plugins/plugin_wid_blog.kv Sat Oct 26 22:44:37 2024 +0200 @@ -18,7 +18,7 @@ : size_hint: None, 1 - symbol: "search" + symbol: "magnifying-glass" width: dp(30) font_size: dp(25) color: 0.4, 0.4, 0.4, 1 @@ -136,7 +136,7 @@ height: created_ts.height width: self.height id: encrypted - symbol: 'lock-filled' if root.blog_data.get("encrypted") else 'lock-open' + symbol: 'lock' if root.blog_data.get("encrypted") else 'unlock' font_size: created_ts.height opacity: 1 if root.blog_data.get("encrypted") else 0 color: 0.29,0.87,0.0,1 diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/plugins/plugin_wid_calls.kv --- a/libervia/desktop_kivy/plugins/plugin_wid_calls.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/plugins/plugin_wid_calls.kv Sat Oct 26 22:44:37 2024 +0200 @@ -119,7 +119,7 @@ pos_hint: {"right": 1, "top": 1} margin_x: dp(10) margin_y: dp(10) - symbol: "resize-small" if root.fullscreen else "resize-full" + symbol: "minimize" if root.fullscreen else "maximize" color: 0.29, 0.29, 0.29, 1 background_color: 0.96, 0.96, 0.96, 1 on_press: root.fullscreen = not root.fullscreen @@ -135,17 +135,17 @@ Widget: CallControlButton: - symbol: "videocam" + symbol: "video" active: not root.video_muted on_press: root.video_muted = not root.video_muted CallControlButton: - symbol: "volume-up" + symbol: "volume-high" active: not root.audio_muted on_press: root.audio_muted = not root.audio_muted CallControlButton: - symbol: "desktop" + symbol: "display" active: root.desktop_sharing background_color: (0.28, 0.78, 0.56, 1) if not self.active else (0.95, 0.27, 0.41, 1) on_press: root.on_desktop_btn_press() @@ -157,7 +157,7 @@ width: 2 cap: "round" CallControlButton: - symbol: "doc" + symbol: "regular file" color: 0, 0, 0, 1 background_color: (1, 1, 1, 1) on_press: root.on_file_btn_press() diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/plugins/plugin_wid_chat.kv --- a/libervia/desktop_kivy/plugins/plugin_wid_chat.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/plugins/plugin_wid_chat.kv Sat Oct 26 22:44:37 2024 +0200 @@ -143,7 +143,7 @@ size_hint_x: None width: self.height id: encrypted - symbol: 'lock-filled' if root.mess_data.encrypted else 'lock-open' + symbol: 'lock' if root.mess_data.encrypted else 'unlock' font_size: self.height - dp(3) color: (1, 0, 0, 1) if not root.mess_data.encrypted and root.chat.encrypted else (0.55,0.55,0.55,1) Label: @@ -173,7 +173,7 @@ SymbolButton: opacity: 0 if root.sending else 1 size_hint: None, 1 - symbol: "cancel-circled" + symbol: "circle-xmark" on_press: root.parent.remove_widget(root) @@ -257,7 +257,7 @@ on_text_validate: root.on_send(args[0]) SymbolButton: # "send" button, permanent visibility depends on platform - symbol: "forward" + symbol: "share" size_hint: None, 1 width: dp(30) if root.send_button_visible else 0 opacity: 1 if root.send_button_visible else 0 @@ -269,7 +269,7 @@ : size_hint: None, 1 - symbol: "plus-circled" + symbol: "circle-plus" width: dp(30) font_size: dp(25) color: 0.4, 0.4, 0.4, 1 @@ -290,7 +290,7 @@ : size_hint: None, 1 - symbol: "dot-3-vert" + symbol: "ellipsis-vertical" width: dp(30) font_size: dp(25) color: 0.4, 0.4, 0.4, 1 @@ -303,7 +303,7 @@ symbol: self.get_symbol() : - symbol: "shield" + symbol: "shield-halved" padding: dp(5), dp(10) bg_color: app.c_prim_dark size_hint: None, 1 diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/plugins/plugin_wid_chat.py --- a/libervia/desktop_kivy/plugins/plugin_wid_chat.py Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/plugins/plugin_wid_chat.py Sat Oct 26 22:44:37 2024 +0200 @@ -59,7 +59,7 @@ "name": _("chat"), "main": "Chat", "description": _("instant messaging with one person or a group"), - "icon_symbol": "chat", + "icon_symbol": "comments", } # FIXME: OTR specific code is legacy, and only used nowadays for lock color @@ -71,9 +71,9 @@ OTR_STATE_ENCRYPTED = 'encrypted' OTR_STATE_ENCRYPTION = (OTR_STATE_UNENCRYPTED, OTR_STATE_ENCRYPTED) -SYMBOL_UNENCRYPTED = 'lock-open' +SYMBOL_UNENCRYPTED = 'unlock' SYMBOL_ENCRYPTED = 'lock' -SYMBOL_ENCRYPTED_TRUSTED = 'lock-filled' +SYMBOL_ENCRYPTED_TRUSTED = 'lock' COLOR_UNENCRYPTED = (0.4, 0.4, 0.4, 1) COLOR_ENCRYPTED = (0.4, 0.4, 0.4, 1) COLOR_ENCRYPTED_TRUSTED = (0.29,0.87,0.0,1) @@ -118,13 +118,13 @@ media_type = data.get(C.KEY_ATTACHMENTS_MEDIA_TYPE, '') main_type = media_type.split('/', 1)[0] if main_type == 'image': - return "file-image" + return "regular file-image" elif main_type == 'video': - return "file-video" + return "regular file-video" elif main_type == 'audio': - return "file-audio" + return "regular file-audio" else: - return "doc" + return "regular file" def on_press(self): url = self.data.get('url') @@ -212,7 +212,7 @@ else: # we don't download automatically the image if the contact is not # in roster, to avoid leaking the ip - wid = Symbol(symbol="file-image") + wid = Symbol(symbol="regular file-image") self.add_widget(wid) else: wid = None @@ -496,9 +496,10 @@ def get_symbol(self): if self.chat.otr_state_encryption == OTR_STATE_UNENCRYPTED: - return 'lock-open' + return 'unlock' elif self.chat.otr_state_trust == OTR_STATE_TRUSTED: - return 'lock-filled' + # FIXME: Used to be "lock-filled" before transition to font-awesome. + return 'lock' else: return 'lock' @@ -899,7 +900,7 @@ G.host.add_note( _("private message"), notif_msg, - symbol = "chat", + symbol = "comments", action = { "action": 'chat', "target": self.target, @@ -911,7 +912,7 @@ G.host.add_note( _("mention"), notif_msg, - symbol = "chat", + symbol = "comments", action = { "action": 'chat', "target": self.target, diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/plugins/plugin_wid_contact_list.kv --- a/libervia/desktop_kivy/plugins/plugin_wid_contact_list.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/plugins/plugin_wid_contact_list.kv Sat Oct 26 22:44:37 2024 +0200 @@ -85,7 +85,7 @@ font_size: dp(30) Widget: SymbolButtonLabel: - symbol: 'plus-circled' + symbol: 'circle-plus' text: _("add a contact") on_release: root.add_contact_menu() Widget: diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/plugins/plugin_wid_file_sharing.kv --- a/libervia/desktop_kivy/plugins/plugin_wid_file_sharing.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/plugins/plugin_wid_file_sharing.kv Sat Oct 26 22:44:37 2024 +0200 @@ -46,7 +46,7 @@ size_hint: 1, None height: dp(80) font_size: dp(40) - symbol: 'folder-open-empty' if root.is_dir else 'doc' + symbol: 'regular folder-open' if root.is_dir else 'regular file' color: (1, 0, 0, 1) if root.shared else (0, 0, 0, 1) if root.is_dir else app.c_prim_dark Label: size_hint: None, None diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/plugins/plugin_wid_file_sharing.py --- a/libervia/desktop_kivy/plugins/plugin_wid_file_sharing.py Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/plugins/plugin_wid_file_sharing.py Sat Oct 26 22:44:37 2024 +0200 @@ -45,7 +45,7 @@ "name": _("file sharing"), "main": "FileSharing", "description": _("share/transfer files between devices"), - "icon_symbol": "exchange", + "icon_symbol": "arrow-right-arrow-left", } MODE_VIEW = "view" MODE_LOCAL = "local" diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/plugins/plugin_wid_remote.kv --- a/libervia/desktop_kivy/plugins/plugin_wid_remote.kv Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/plugins/plugin_wid_remote.kv Sat Oct 26 22:44:37 2024 +0200 @@ -42,7 +42,7 @@ Symbol: size_hint: 1, None height: dp(80) - symbol: 'video' + symbol: 'film' color: 0, 0, 0, 1 Label: size_hint: None, None @@ -83,19 +83,19 @@ height: dp(30) Widget: PlayerButton: - symbol: "previous" + symbol: "backward-fast" on_release: root.do_cmd("Previous") PlayerButton: - symbol: "fast-bw" + symbol: "backward" on_release: root.do_cmd("GoBack") PlayerButton: symbol: root.status on_release: root.do_cmd("PlayPause") PlayerButton - symbol: "fast-fw" + symbol: "forward" on_release: root.do_cmd("GoFW") PlayerButton - symbol: "next" + symbol: "forward-fast" on_release: root.do_cmd("Next") Widget: Widget: diff -r f316c7f19909 -r 196483685a63 libervia/desktop_kivy/plugins/plugin_wid_remote.py --- a/libervia/desktop_kivy/plugins/plugin_wid_remote.py Sat Jul 13 13:08:13 2024 +0200 +++ b/libervia/desktop_kivy/plugins/plugin_wid_remote.py Sat Oct 26 22:44:37 2024 +0200 @@ -44,7 +44,7 @@ "name": _("remote control"), "main": "RemoteControl", "description": _("universal remote control"), - "icon_symbol": "signal", + "icon_symbol": "wifi", } NOTE_TITLE = _("Media Player Remote Control")