From 84fec9578bf514c6c6fd492396b0bbd76c73ea40 Mon Sep 17 00:00:00 2001 From: Li Tao Date: Thu, 26 Nov 2020 17:36:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(bluet):=20=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E8=93=9D=E7=89=99=E7=95=8C=E9=9D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 字体采用T4 Mudium,设备图标颜色:深色模式下为#ffffff 浅色模式下为#000000,关闭按钮和选中图标距离右边边距为10 Log: 蓝牙弹框界面问题 Bug: https://pms.uniontech.com/zentao/bug-view-52349.html Change-Id: I3191bcddab4458f9aa3f4f91c4287d20c292be13 --- plugins/bluetooth/bluetoothapplet.cpp | 3 +++ plugins/bluetooth/componments/switchitem.cpp | 4 +++- .../resources/dark/buletooth_camera_dark.svg | 10 +++++++--- .../resources/dark/buletooth_clang_dark.svg | 10 +++++++--- .../resources/dark/buletooth_keyboard_dark.svg | 10 +++++++--- .../resources/dark/buletooth_lan_dark.svg | 10 +++++++--- .../resources/dark/buletooth_laptop_dark.svg | 10 +++++++--- .../resources/dark/buletooth_microphone_dark.svg | 10 +++++++--- .../resources/dark/buletooth_mouse_dark.svg | 10 +++++++--- .../resources/dark/buletooth_other_dark.svg | 10 +++++++--- .../resources/dark/buletooth_pad_dark.svg | 10 +++++++--- .../bluetooth/resources/dark/buletooth_pc_dark.svg | 12 +++++++++--- .../resources/dark/buletooth_pen_dark.svg | 10 +++++++--- .../resources/dark/buletooth_pheadset_dark.svg | 10 +++++++--- .../resources/dark/buletooth_phone_dark.svg | 10 +++++++--- .../resources/dark/buletooth_print_dark.svg | 10 +++++++--- .../resources/dark/buletooth_scaner_dark.svg | 10 +++++++--- .../resources/dark/buletooth_touchpad_dark.svg | 10 +++++++--- .../bluetooth/resources/dark/buletooth_tv_dark.svg | 14 ++++++++------ .../resources/dark/buletooth_vidicon_dark.svg | 10 +++++++--- .../resources/light/buletooth_camera_light.svg | 10 +++++++--- .../resources/light/buletooth_clang_light.svg | 10 +++++++--- .../resources/light/buletooth_keyboard_light.svg | 10 +++++++--- .../resources/light/buletooth_lan_light.svg | 10 +++++++--- .../resources/light/buletooth_laptop_light.svg | 10 +++++++--- .../resources/light/buletooth_microphone_light.svg | 10 +++++++--- .../resources/light/buletooth_mouse_light.svg | 10 +++++++--- .../resources/light/buletooth_other_light.svg | 10 +++++++--- .../resources/light/buletooth_pad_light.svg | 10 +++++++--- .../resources/light/buletooth_pc_light.svg | 12 +++++++++--- .../resources/light/buletooth_pen_light.svg | 10 +++++++--- .../resources/light/buletooth_pheadset_light.svg | 10 +++++++--- .../resources/light/buletooth_phone_light.svg | 10 +++++++--- .../resources/light/buletooth_print_light.svg | 10 +++++++--- .../resources/light/buletooth_scaner_light.svg | 10 +++++++--- .../resources/light/buletooth_touchpad_light.svg | 10 +++++++--- .../resources/light/buletooth_tv_light.svg | 14 ++++++++------ .../resources/light/buletooth_vidicon_light.svg | 10 +++++++--- 38 files changed, 264 insertions(+), 115 deletions(-) diff --git a/plugins/bluetooth/bluetoothapplet.cpp b/plugins/bluetooth/bluetoothapplet.cpp index 13ea6dc6c..71f290d2a 100644 --- a/plugins/bluetooth/bluetoothapplet.cpp +++ b/plugins/bluetooth/bluetoothapplet.cpp @@ -67,6 +67,8 @@ BluetoothApplet::BluetoothApplet(QWidget *parent) , m_adaptersManager(new AdaptersManager(this)) { m_line->setVisible(false); + m_adapterLayout->setContentsMargins(0, 0, 0, 0); + m_adapterLayout->setSpacing(20); QFont defaultFont = font(); auto titlefont = QFont(defaultFont.family(), defaultFont.pointSize() + 2); @@ -104,6 +106,7 @@ BluetoothApplet::BluetoothApplet(QWidget *parent) setFixedWidth(POPUPWIDTH); setWidget(m_centralWidget); + setContentsMargins(0, 0, 0, 0); setFrameShape(QFrame::NoFrame); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); diff --git a/plugins/bluetooth/componments/switchitem.cpp b/plugins/bluetooth/componments/switchitem.cpp index 2d6e8bfa2..6c36e1355 100644 --- a/plugins/bluetooth/componments/switchitem.cpp +++ b/plugins/bluetooth/componments/switchitem.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -41,6 +42,7 @@ SwitchItem::SwitchItem(QWidget *parent) { initFontColor(m_title); + DFontSizeManager::instance()->bind(m_title, DFontSizeManager::T4, QFont::Medium); m_switchBtn->setFixedWidth(SWITCHBUTTONWIDTH); const QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/wireless/resources/wireless/refresh_dark.svg"); @@ -71,7 +73,7 @@ SwitchItem::SwitchItem(QWidget *parent) switchLayout->addWidget(m_loadingIndicator); switchLayout->addSpacing(MARGIN); switchLayout->addWidget(m_switchBtn); - switchLayout->addSpacing(MARGIN); + switchLayout->addSpacing(2); setLayout(switchLayout); connect(m_switchBtn, &DSwitchButton::toggled, [&](bool change) { diff --git a/plugins/bluetooth/resources/dark/buletooth_camera_dark.svg b/plugins/bluetooth/resources/dark/buletooth_camera_dark.svg index 0e31ddb71..24d902840 100644 --- a/plugins/bluetooth/resources/dark/buletooth_camera_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_camera_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_camera_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_clang_dark.svg b/plugins/bluetooth/resources/dark/buletooth_clang_dark.svg index 551098cfa..967f22fd5 100644 --- a/plugins/bluetooth/resources/dark/buletooth_clang_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_clang_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_clang_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_keyboard_dark.svg b/plugins/bluetooth/resources/dark/buletooth_keyboard_dark.svg index 31be6f69f..08b35662b 100644 --- a/plugins/bluetooth/resources/dark/buletooth_keyboard_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_keyboard_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_keyboard_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_lan_dark.svg b/plugins/bluetooth/resources/dark/buletooth_lan_dark.svg index 963913bce..8e5330f0d 100644 --- a/plugins/bluetooth/resources/dark/buletooth_lan_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_lan_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_lan_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_laptop_dark.svg b/plugins/bluetooth/resources/dark/buletooth_laptop_dark.svg index f18c39e7b..078e6ac3c 100644 --- a/plugins/bluetooth/resources/dark/buletooth_laptop_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_laptop_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_laptop_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_microphone_dark.svg b/plugins/bluetooth/resources/dark/buletooth_microphone_dark.svg index eb56cbbe2..968445cc8 100644 --- a/plugins/bluetooth/resources/dark/buletooth_microphone_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_microphone_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_microphone_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_mouse_dark.svg b/plugins/bluetooth/resources/dark/buletooth_mouse_dark.svg index f00044fb5..7d054f548 100644 --- a/plugins/bluetooth/resources/dark/buletooth_mouse_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_mouse_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_mouse_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_other_dark.svg b/plugins/bluetooth/resources/dark/buletooth_other_dark.svg index c1e8c93c1..ffb55f5ed 100644 --- a/plugins/bluetooth/resources/dark/buletooth_other_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_other_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_other_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_pad_dark.svg b/plugins/bluetooth/resources/dark/buletooth_pad_dark.svg index f6b602301..96e30c7d6 100644 --- a/plugins/bluetooth/resources/dark/buletooth_pad_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_pad_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_pad_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_pc_dark.svg b/plugins/bluetooth/resources/dark/buletooth_pc_dark.svg index 854690a2b..6341d8e80 100644 --- a/plugins/bluetooth/resources/dark/buletooth_pc_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_pc_dark.svg @@ -1,3 +1,9 @@ - - - + + + buletooth_pc_dark + + + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_pen_dark.svg b/plugins/bluetooth/resources/dark/buletooth_pen_dark.svg index fe9135e9e..1d3d6475a 100644 --- a/plugins/bluetooth/resources/dark/buletooth_pen_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_pen_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_pen_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_pheadset_dark.svg b/plugins/bluetooth/resources/dark/buletooth_pheadset_dark.svg index 757da422b..2b84e210c 100644 --- a/plugins/bluetooth/resources/dark/buletooth_pheadset_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_pheadset_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_pheadset_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_phone_dark.svg b/plugins/bluetooth/resources/dark/buletooth_phone_dark.svg index 54cae0504..5bb529628 100644 --- a/plugins/bluetooth/resources/dark/buletooth_phone_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_phone_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_phone_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_print_dark.svg b/plugins/bluetooth/resources/dark/buletooth_print_dark.svg index ac3468990..4dc865b5d 100644 --- a/plugins/bluetooth/resources/dark/buletooth_print_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_print_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_print_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_scaner_dark.svg b/plugins/bluetooth/resources/dark/buletooth_scaner_dark.svg index 5f3674243..6f11f03f6 100644 --- a/plugins/bluetooth/resources/dark/buletooth_scaner_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_scaner_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_scaner_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_touchpad_dark.svg b/plugins/bluetooth/resources/dark/buletooth_touchpad_dark.svg index 3587147de..21ccab5e9 100644 --- a/plugins/bluetooth/resources/dark/buletooth_touchpad_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_touchpad_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_touchpad_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_tv_dark.svg b/plugins/bluetooth/resources/dark/buletooth_tv_dark.svg index 29a70aab1..f6ff9ed09 100644 --- a/plugins/bluetooth/resources/dark/buletooth_tv_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_tv_dark.svg @@ -1,6 +1,8 @@ - - - - - - + + + buletooth_tv_dark + + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/dark/buletooth_vidicon_dark.svg b/plugins/bluetooth/resources/dark/buletooth_vidicon_dark.svg index 63022ddb6..6d1f55b33 100644 --- a/plugins/bluetooth/resources/dark/buletooth_vidicon_dark.svg +++ b/plugins/bluetooth/resources/dark/buletooth_vidicon_dark.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_vidicon_dark + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_camera_light.svg b/plugins/bluetooth/resources/light/buletooth_camera_light.svg index 08e55e5a0..926f08b22 100644 --- a/plugins/bluetooth/resources/light/buletooth_camera_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_camera_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_camera_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_clang_light.svg b/plugins/bluetooth/resources/light/buletooth_clang_light.svg index 4144fd53c..1e3124b2d 100644 --- a/plugins/bluetooth/resources/light/buletooth_clang_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_clang_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_clang_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_keyboard_light.svg b/plugins/bluetooth/resources/light/buletooth_keyboard_light.svg index 51ebae89f..bb189deed 100644 --- a/plugins/bluetooth/resources/light/buletooth_keyboard_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_keyboard_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_keyboard_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_lan_light.svg b/plugins/bluetooth/resources/light/buletooth_lan_light.svg index 10924687e..d495b9846 100644 --- a/plugins/bluetooth/resources/light/buletooth_lan_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_lan_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_lan_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_laptop_light.svg b/plugins/bluetooth/resources/light/buletooth_laptop_light.svg index 62bdfc074..0e132c2ce 100644 --- a/plugins/bluetooth/resources/light/buletooth_laptop_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_laptop_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_laptop_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_microphone_light.svg b/plugins/bluetooth/resources/light/buletooth_microphone_light.svg index 5ddcd2f54..8dac57029 100644 --- a/plugins/bluetooth/resources/light/buletooth_microphone_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_microphone_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_microphone_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_mouse_light.svg b/plugins/bluetooth/resources/light/buletooth_mouse_light.svg index 97cc53ff3..a9120efe6 100644 --- a/plugins/bluetooth/resources/light/buletooth_mouse_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_mouse_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_mouse_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_other_light.svg b/plugins/bluetooth/resources/light/buletooth_other_light.svg index 27106450f..60c4d7883 100644 --- a/plugins/bluetooth/resources/light/buletooth_other_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_other_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_other_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_pad_light.svg b/plugins/bluetooth/resources/light/buletooth_pad_light.svg index 07f3a1fc6..d5cf5589e 100644 --- a/plugins/bluetooth/resources/light/buletooth_pad_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_pad_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_pad_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_pc_light.svg b/plugins/bluetooth/resources/light/buletooth_pc_light.svg index be57cfddf..c164df087 100644 --- a/plugins/bluetooth/resources/light/buletooth_pc_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_pc_light.svg @@ -1,3 +1,9 @@ - - - + + + buletooth_pc_light + + + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_pen_light.svg b/plugins/bluetooth/resources/light/buletooth_pen_light.svg index 064fb0386..d1d2a5771 100644 --- a/plugins/bluetooth/resources/light/buletooth_pen_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_pen_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_pen_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_pheadset_light.svg b/plugins/bluetooth/resources/light/buletooth_pheadset_light.svg index febbfdc1a..8d08fdd87 100644 --- a/plugins/bluetooth/resources/light/buletooth_pheadset_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_pheadset_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_pheadset_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_phone_light.svg b/plugins/bluetooth/resources/light/buletooth_phone_light.svg index 5c75b1a52..0acfa2880 100644 --- a/plugins/bluetooth/resources/light/buletooth_phone_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_phone_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_phone_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_print_light.svg b/plugins/bluetooth/resources/light/buletooth_print_light.svg index 026e5e6e8..fad7fd7d9 100644 --- a/plugins/bluetooth/resources/light/buletooth_print_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_print_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_print_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_scaner_light.svg b/plugins/bluetooth/resources/light/buletooth_scaner_light.svg index 7bf436a35..d4c923ca7 100644 --- a/plugins/bluetooth/resources/light/buletooth_scaner_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_scaner_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_scaner_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_touchpad_light.svg b/plugins/bluetooth/resources/light/buletooth_touchpad_light.svg index ebd33122f..3460b59a9 100644 --- a/plugins/bluetooth/resources/light/buletooth_touchpad_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_touchpad_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_touchpad_light + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_tv_light.svg b/plugins/bluetooth/resources/light/buletooth_tv_light.svg index d2237940e..b3dac2016 100644 --- a/plugins/bluetooth/resources/light/buletooth_tv_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_tv_light.svg @@ -1,6 +1,8 @@ - - - - - - + + + buletooth_tv_light + + + + + \ No newline at end of file diff --git a/plugins/bluetooth/resources/light/buletooth_vidicon_light.svg b/plugins/bluetooth/resources/light/buletooth_vidicon_light.svg index 40a387403..a9d13281f 100644 --- a/plugins/bluetooth/resources/light/buletooth_vidicon_light.svg +++ b/plugins/bluetooth/resources/light/buletooth_vidicon_light.svg @@ -1,3 +1,7 @@ - - - + + + buletooth_vidicon_light + + + + \ No newline at end of file