From ca644f8de0bfc6092daf04265546f4d607515097 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Mon, 13 Nov 2023 17:57:39 +0100 Subject: Bluetooth Chat example: update UI * Add some icons for Light and Dark themes. Implement switching between themes by listening to QStyleHints::colorSchemeChanged() signal and manually picking the proper icon. * Rework the desing to get rid of the unnecessary "Quit" button, and also change the layout of buttons in the connection dialog. * Update the screenshot in the documentation. As a drive-by fix, make sure that the cursor is always at the end of QTextEdit before showing a new message. The user can change the cursor position by clicking/selecting the text, and this could previously lead to some bugs in message visualization. Fixes: QTBUG-118875 Pick-to: 6.5 Change-Id: Ia3a9dec3dae0d1411643ed851eba0ab4dc96a47f Reviewed-by: Axel Spoerl Reviewed-by: Volker Hilsheimer Reviewed-by: Alex Blasche (cherry picked from commit 6eb66322f0933de004baf35a96c5dd06d5d62ff6) Reviewed-by: Qt Cherry-pick Bot --- examples/bluetooth/btchat/btchat.pro | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'examples/bluetooth/btchat/btchat.pro') diff --git a/examples/bluetooth/btchat/btchat.pro b/examples/bluetooth/btchat/btchat.pro index 7e0c976f..0d7b5f77 100644 --- a/examples/bluetooth/btchat/btchat.pro +++ b/examples/bluetooth/btchat/btchat.pro @@ -21,6 +21,29 @@ FORMS = \ chat.ui \ remoteselector.ui +theme_resources.files = \ + icons/btchat/24x24/bluetooth.png \ + icons/btchat/24x24/bluetooth_dark.png \ + icons/btchat/24x24/send.png \ + icons/btchat/24x24/send_dark.png \ + icons/btchat/24x24@2/bluetooth.png \ + icons/btchat/24x24@2/bluetooth_dark.png \ + icons/btchat/24x24@2/send.png \ + icons/btchat/24x24@2/send_dark.png \ + icons/btchat/24x24@3/bluetooth.png \ + icons/btchat/24x24@3/bluetooth_dark.png \ + icons/btchat/24x24@3/send.png \ + icons/btchat/24x24@3/send_dark.png \ + icons/btchat/24x24@4/bluetooth.png \ + icons/btchat/24x24@4/bluetooth_dark.png \ + icons/btchat/24x24@4/send.png \ + icons/btchat/24x24@4/send_dark.png \ + icons/btchat/index.theme + +theme_resources.prefix = / + +RESOURCES += theme_resources + ios: QMAKE_INFO_PLIST = ../shared/Info.qmake.ios.plist macos: QMAKE_INFO_PLIST = ../shared/Info.qmake.macos.plist -- cgit v1.2.3