From 20f6565f441e344a10a2aae02a34640b974ef7cc Mon Sep 17 00:00:00 2001 From: Dmitry K Date: Fri, 16 May 2025 02:34:39 +0400 Subject: [PATCH] Monitor and Laptop device types --- .../RGBController_AlienwareAW3423DWF.cpp | 2 +- .../RGBController_AlienwareMonitor.cpp | 2 +- .../RGBController_AsusAuraCoreLaptop.cpp | 2 +- .../RGBController_AsusAuraMonitor.cpp | 2 +- .../RGBController_AsusTUFLaptop_Linux.cpp | 4 +- .../RGBController_AsusTUFLaptop_Windows.cpp | 4 +- .../RGBController_CMMonitorController.cpp | 2 +- .../RGBController_CMMonitorController.h | 1 - .../RGBController_Faustus_Linux.cpp | 4 +- .../RGBController_GigabyteAorusLaptop.cpp | 2 +- .../LGMonitorControllerDetect.cpp | 2 +- .../RGBController_LGMonitor.cpp | 2 +- .../RGBController_Lenovo4ZoneUSB.cpp | 2 +- .../RGBController_MSI3Zone.cpp | 2 +- Controllers/RazerController/RazerDevices.cpp | 73 +++++++++--------- .../RGBController_XG270QG.cpp | 3 +- .../RGBController_XG270QG.h | 2 - RGBController/RGBController.h | 2 + qt/OpenRGBDialog/OpenRGBDialog.cpp | 6 ++ qt/OpenRGBFont.h | 4 +- qt/fonts/OpenRGB.ttf | Bin 7732 -> 8004 bytes qt/fonts/README.md | 28 +++++++ 22 files changed, 92 insertions(+), 59 deletions(-) create mode 100644 qt/fonts/README.md diff --git a/Controllers/AlienwareMonitorController/RGBController_AlienwareAW3423DWF.cpp b/Controllers/AlienwareMonitorController/RGBController_AlienwareAW3423DWF.cpp index b1c94faf..0bb5e199 100644 --- a/Controllers/AlienwareMonitorController/RGBController_AlienwareAW3423DWF.cpp +++ b/Controllers/AlienwareMonitorController/RGBController_AlienwareAW3423DWF.cpp @@ -28,7 +28,7 @@ RGBController_AlienwareAW3423DWF::RGBController_AlienwareAW3423DWF(AlienwareAW34 name = "Alienware AW3423DWF"; vendor = "Alienware"; - type = DEVICE_TYPE_ACCESSORY; + type = DEVICE_TYPE_MONITOR; description = "Alienware AW3423DWF Monitor Device"; location = controller->GetLocation(); serial = controller->GetSerialString(); diff --git a/Controllers/AlienwareMonitorController/RGBController_AlienwareMonitor.cpp b/Controllers/AlienwareMonitorController/RGBController_AlienwareMonitor.cpp index e8aabfe4..041a729c 100644 --- a/Controllers/AlienwareMonitorController/RGBController_AlienwareMonitor.cpp +++ b/Controllers/AlienwareMonitorController/RGBController_AlienwareMonitor.cpp @@ -29,7 +29,7 @@ RGBController_AlienwareMonitor::RGBController_AlienwareMonitor(AlienwareMonitorC name = "Alienware Monitor"; description = "Alienware Monitor"; vendor = "Alienware"; - type = DEVICE_TYPE_ACCESSORY; + type = DEVICE_TYPE_MONITOR; location = controller->GetLocation(); serial = controller->GetSerialString(); diff --git a/Controllers/AsusAuraCoreController/AsusAuraCoreLaptopController/RGBController_AsusAuraCoreLaptop.cpp b/Controllers/AsusAuraCoreController/AsusAuraCoreLaptopController/RGBController_AsusAuraCoreLaptop.cpp index 22ab9cae..8f6adc3e 100644 --- a/Controllers/AsusAuraCoreController/AsusAuraCoreLaptopController/RGBController_AsusAuraCoreLaptop.cpp +++ b/Controllers/AsusAuraCoreController/AsusAuraCoreLaptopController/RGBController_AsusAuraCoreLaptop.cpp @@ -41,7 +41,7 @@ RGBController_AsusAuraCoreLaptop::RGBController_AsusAuraCoreLaptop(AsusAuraCoreL name = aura_dev->dmi_name; vendor = "Asus"; - type = DEVICE_TYPE_KEYBOARD; + type = DEVICE_TYPE_LAPTOP; description = controller->GetDeviceDescription(); serial = controller->GetSerial(); location = controller->GetLocation(); diff --git a/Controllers/AsusAuraUSBController/AsusAuraMonitorController/RGBController_AsusAuraMonitor.cpp b/Controllers/AsusAuraUSBController/AsusAuraMonitorController/RGBController_AsusAuraMonitor.cpp index 50d5495d..944302e7 100644 --- a/Controllers/AsusAuraUSBController/AsusAuraMonitorController/RGBController_AsusAuraMonitor.cpp +++ b/Controllers/AsusAuraUSBController/AsusAuraMonitorController/RGBController_AsusAuraMonitor.cpp @@ -28,7 +28,7 @@ RGBController_AuraMonitor::RGBController_AuraMonitor(AuraMonitorController* cont name = "ASUS Aura Monitor"; vendor = "ASUS"; - type = DEVICE_TYPE_ACCESSORY; + type = DEVICE_TYPE_MONITOR; description = "ASUS Aura Monitor Device"; location = controller->GetDeviceLocation(); serial = controller->GetSerialString(); diff --git a/Controllers/AsusTUFLaptopController/RGBController_AsusTUFLaptop_Linux.cpp b/Controllers/AsusTUFLaptopController/RGBController_AsusTUFLaptop_Linux.cpp index 2501f1ba..d0d5c804 100644 --- a/Controllers/AsusTUFLaptopController/RGBController_AsusTUFLaptop_Linux.cpp +++ b/Controllers/AsusTUFLaptopController/RGBController_AsusTUFLaptop_Linux.cpp @@ -27,9 +27,9 @@ RGBController_AsusTUFLaptopLinux::RGBController_AsusTUFLaptopLinux(AsusTUFLaptop { controller = controller_ptr; - name = "ASUS TUF Keyboard"; + name = "ASUS TUF Laptop Keyboard"; vendor = "ASUS"; - type = DEVICE_TYPE_KEYBOARD; + type = DEVICE_TYPE_LAPTOP; description = "Asus TUF Device"; location = ASUS_KBD_BACKLIGHT_BASE_PATH; diff --git a/Controllers/AsusTUFLaptopController/RGBController_AsusTUFLaptop_Windows.cpp b/Controllers/AsusTUFLaptopController/RGBController_AsusTUFLaptop_Windows.cpp index 9b170cd6..562dfa03 100644 --- a/Controllers/AsusTUFLaptopController/RGBController_AsusTUFLaptop_Windows.cpp +++ b/Controllers/AsusTUFLaptopController/RGBController_AsusTUFLaptop_Windows.cpp @@ -24,9 +24,9 @@ using namespace std::chrono_literals; RGBController_AsusTUFLaptopWMI::RGBController_AsusTUFLaptopWMI(AsusTUFLaptopController* controller_ptr) { - name = "ASUS TUF Keyboard"; + name = "ASUS TUF Laptop Keyboard"; vendor = "ASUS"; - type = DEVICE_TYPE_KEYBOARD; + type = DEVICE_TYPE_LAPTOP; description = "WMI Device"; location = "\\\\.\\ATKACPI"; diff --git a/Controllers/CoolerMasterController/CMMonitorController/RGBController_CMMonitorController.cpp b/Controllers/CoolerMasterController/CMMonitorController/RGBController_CMMonitorController.cpp index 7f2ff7f8..1235486d 100644 --- a/Controllers/CoolerMasterController/CMMonitorController/RGBController_CMMonitorController.cpp +++ b/Controllers/CoolerMasterController/CMMonitorController/RGBController_CMMonitorController.cpp @@ -29,7 +29,7 @@ RGBController_CMMonitorController::RGBController_CMMonitorController(CMMonitorCo controller = controller_ptr; name = "CoolerMaster LED Controller A1"; vendor = "CoolerMaster"; - type = DEVICE_TYPE_ACCESSORY; + type = DEVICE_TYPE_MONITOR; description = name; location = controller->GetDeviceLocation(); serial = controller->GetSerialString(); diff --git a/Controllers/CoolerMasterController/CMMonitorController/RGBController_CMMonitorController.h b/Controllers/CoolerMasterController/CMMonitorController/RGBController_CMMonitorController.h index 27ef32ee..28f5cbe7 100644 --- a/Controllers/CoolerMasterController/CMMonitorController/RGBController_CMMonitorController.h +++ b/Controllers/CoolerMasterController/CMMonitorController/RGBController_CMMonitorController.h @@ -11,7 +11,6 @@ #pragma once -#include #include "RGBController.h" #include "CMMonitorController.h" diff --git a/Controllers/FaustusController/RGBController_Faustus_Linux.cpp b/Controllers/FaustusController/RGBController_Faustus_Linux.cpp index ae3d2fe1..4cf9e12d 100644 --- a/Controllers/FaustusController/RGBController_Faustus_Linux.cpp +++ b/Controllers/FaustusController/RGBController_Faustus_Linux.cpp @@ -25,9 +25,9 @@ RGBController_Faustus::RGBController_Faustus(const std::string& dev_path) { - name = "ASUS TUF Keyboard"; + name = "ASUS TUF Laptop Keyboard"; vendor = "ASUS"; - type = DEVICE_TYPE_KEYBOARD; + type = DEVICE_TYPE_LAPTOP; description = "Faustus Device"; modes.resize(4); diff --git a/Controllers/GigabyteAorusLaptopController/RGBController_GigabyteAorusLaptop.cpp b/Controllers/GigabyteAorusLaptopController/RGBController_GigabyteAorusLaptop.cpp index 2f2d8406..7a117236 100644 --- a/Controllers/GigabyteAorusLaptopController/RGBController_GigabyteAorusLaptop.cpp +++ b/Controllers/GigabyteAorusLaptopController/RGBController_GigabyteAorusLaptop.cpp @@ -75,7 +75,7 @@ RGBController_GigabyteAorusLaptop::RGBController_GigabyteAorusLaptop(GigabyteAor this->dev_type = dev_type; controller = controller_ptr; vendor = "Gigabyte"; - type = DEVICE_TYPE_KEYBOARD; + type = DEVICE_TYPE_LAPTOP; description = "Aorus Laptop"; location = controller->GetDeviceLocation(); serial = controller->GetSerialString(); diff --git a/Controllers/LGMonitorController/LGMonitorControllerDetect.cpp b/Controllers/LGMonitorController/LGMonitorControllerDetect.cpp index 50ca7040..7f785ede 100644 --- a/Controllers/LGMonitorController/LGMonitorControllerDetect.cpp +++ b/Controllers/LGMonitorController/LGMonitorControllerDetect.cpp @@ -25,7 +25,7 @@ #define LG_27GN950_B_PID 0x9A8A #define LG_38GL950G_PID 0x9A57 -void DetectLGMonitorControllers(hid_device_info* info, const std::string& name) +static void DetectLGMonitorControllers(hid_device_info* info, const std::string& name) { hid_device* dev = hid_open_path(info->path); diff --git a/Controllers/LGMonitorController/RGBController_LGMonitor.cpp b/Controllers/LGMonitorController/RGBController_LGMonitor.cpp index 282138f9..4b4a60a0 100644 --- a/Controllers/LGMonitorController/RGBController_LGMonitor.cpp +++ b/Controllers/LGMonitorController/RGBController_LGMonitor.cpp @@ -29,7 +29,7 @@ RGBController_LGMonitor::RGBController_LGMonitor(LGMonitorController* controller { controller = controller_ptr; vendor = "LG"; - type = DEVICE_TYPE_ACCESSORY; + type = DEVICE_TYPE_MONITOR; description = "LG Monitor"; location = controller->GetDeviceLocation(); serial = controller->GetSerialString(); diff --git a/Controllers/LenovoControllers/Lenovo4ZoneUSBController/RGBController_Lenovo4ZoneUSB.cpp b/Controllers/LenovoControllers/Lenovo4ZoneUSBController/RGBController_Lenovo4ZoneUSB.cpp index ef3141ec..1a880b48 100644 --- a/Controllers/LenovoControllers/Lenovo4ZoneUSBController/RGBController_Lenovo4ZoneUSB.cpp +++ b/Controllers/LenovoControllers/Lenovo4ZoneUSBController/RGBController_Lenovo4ZoneUSB.cpp @@ -37,7 +37,7 @@ RGBController_Lenovo4ZoneUSB::RGBController_Lenovo4ZoneUSB(Lenovo4ZoneUSBControl controller = controller_ptr; name = controller->getName(); - type = DEVICE_TYPE_KEYBOARD; + type = DEVICE_TYPE_LAPTOP; vendor = "Lenovo"; diff --git a/Controllers/MSI3ZoneController/RGBController_MSI3Zone.cpp b/Controllers/MSI3ZoneController/RGBController_MSI3Zone.cpp index d5164f3a..62328206 100644 --- a/Controllers/MSI3ZoneController/RGBController_MSI3Zone.cpp +++ b/Controllers/MSI3ZoneController/RGBController_MSI3Zone.cpp @@ -28,7 +28,7 @@ RGBController_MSI3Zone::RGBController_MSI3Zone(MSI3ZoneController* controller_pt name = "MSI 3-Zone Keyboard"; vendor = "MSI"; - type = DEVICE_TYPE_KEYBOARD; + type = DEVICE_TYPE_LAPTOP; description = "MSI 3-Zone Keyboard Device"; location = controller->GetDeviceLocation(); serial = controller->GetSerialString(); diff --git a/Controllers/RazerController/RazerDevices.cpp b/Controllers/RazerController/RazerDevices.cpp index dbdbb7a7..e47e967d 100644 --- a/Controllers/RazerController/RazerDevices.cpp +++ b/Controllers/RazerController/RazerDevices.cpp @@ -2825,7 +2825,7 @@ static const razer_device blade_2016_device = { "Razer Blade (2016)", RAZER_BLADE_2016_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -2860,7 +2860,7 @@ static const razer_device blade_late_2016_device = { "Razer Blade (Late 2016)", RAZER_BLADE_LATE_2016_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -2895,7 +2895,7 @@ static const razer_device blade_15_2018_advanced_device = { "Razer Blade 15 (2018 Advanced)", RAZER_BLADE_2018_ADVANCED_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -2930,7 +2930,7 @@ static const razer_device blade_15_2018_base_device = { "Razer Blade 15 (2018 Base)", RAZER_BLADE_2018_BASE_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -2965,7 +2965,7 @@ static const razer_device blade_15_2018_mercury_device = { "Razer Blade 15 (2018 Mercury)", RAZER_BLADE_2018_MERCURY_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3000,7 +3000,7 @@ static const razer_device blade_15_2019_advanced_device = { "Razer Blade 15 (2019 Advanced)", RAZER_BLADE_2019_ADVANCED_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3035,7 +3035,7 @@ static const razer_device blade_15_2019_base_device = { "Razer Blade 15 (2019 Base)", RAZER_BLADE_2019_BASE_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 1, @@ -3070,7 +3070,7 @@ static const razer_device blade_15_2019_mercury_device = { "Razer Blade 15 (2019 Mercury)", RAZER_BLADE_2019_MERCURY_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3105,7 +3105,7 @@ static const razer_device blade_15_2019_studio_device = { "Razer Blade 15 (2019 Studio)", RAZER_BLADE_2019_STUDIO_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3140,7 +3140,7 @@ static const razer_device blade_15_2020_advanced_device = { "Razer Blade 15 (2020 Advanced)", RAZER_BLADE_2020_ADVANCED_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3175,7 +3175,7 @@ static const razer_device blade_15_2020_base_device = { "Razer Blade 15 (2020 Base)", RAZER_BLADE_2020_BASE_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 1, @@ -3210,7 +3210,7 @@ static const razer_device blade_late_2020_device = { "Razer Blade (Late 2020)", RAZER_BLADE_LATE_2020_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3245,7 +3245,7 @@ static const razer_device blade_15_2021_advanced_device = { "Razer Blade 15 (2021 Advanced)", RAZER_BLADE_2021_ADVANCED_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3280,7 +3280,7 @@ static const razer_device blade_15_2021_base_device = { "Razer Blade 15 (2021 Base)", RAZER_BLADE_2021_BASE_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 1, @@ -3315,7 +3315,7 @@ static const razer_device blade_15_2021_base_v2_device = { "Razer Blade 15 (2021 Base)", RAZER_BLADE_2021_BASE_V2_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x1F, 1, @@ -3350,7 +3350,7 @@ static const razer_device blade_15_late_2021_advanced_device = { "Razer Blade 15 (Late 2021 Advanced)", RAZER_BLADE_LATE_2021_ADVANCED_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3385,7 +3385,7 @@ static const razer_device blade_14_2021_device = { "Razer Blade 14 (2021)", RAZER_BLADE_14_2021_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3420,7 +3420,7 @@ static const razer_device blade_14_2022_device = { "Razer Blade 14 (2022)", RAZER_BLADE_14_2022_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x1F, 6, @@ -3455,7 +3455,7 @@ static const razer_device blade_14_2023_device = { "Razer Blade 14 (2023)", RAZER_BLADE_14_2023_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x1F, 6, @@ -3490,7 +3490,7 @@ static const razer_device blade_15_2022_device = { "Razer Blade 15 (2022)", RAZER_BLADE_15_2022_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x1F, 6, @@ -3525,7 +3525,7 @@ static const razer_device book_13_2020_device = { "Razer Book 13 (2020)", RAZER_BOOK_13_2020_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3560,7 +3560,7 @@ static const razer_device blade_pro_2016_device = { "Razer Blade Pro (2016)", RAZER_BLADE_PRO_2016_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3595,7 +3595,7 @@ static const razer_device blade_pro_2017_device = { "Razer Blade Pro (2017)", RAZER_BLADE_PRO_2017_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3630,7 +3630,7 @@ static const razer_device blade_pro_2017_fullhd_device = { "Razer Blade Pro (2017 FullHD)", RAZER_BLADE_PRO_2017_FULLHD_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3664,7 +3664,7 @@ static const razer_device blade_pro_2019_device = { "Razer Blade Pro (2019)", RAZER_BLADE_PRO_2019_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3699,7 +3699,7 @@ static const razer_device blade_pro_late_2019_device = { "Razer Blade Pro (Late 2019)", RAZER_BLADE_PRO_LATE_2019_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3734,7 +3734,7 @@ static const razer_device blade_pro_17_2020_device = { "Razer Blade Pro 17 (2020)", RAZER_BLADE_PRO_17_2020_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3769,7 +3769,7 @@ static const razer_device blade_pro_17_2021_device = { "Razer Blade Pro 17 (2021)", RAZER_BLADE_PRO_17_2021_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3804,7 +3804,7 @@ static const razer_device blade_stealth_2016_device = { "Razer Blade Stealth (2016)", RAZER_BLADE_STEALTH_2016_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3839,7 +3839,7 @@ static const razer_device blade_stealth_late_2016_device = { "Razer Blade Stealth (Late 2016)", RAZER_BLADE_STEALTH_LATE_2016_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3874,7 +3874,7 @@ static const razer_device blade_stealth_2017_device = { "Razer Blade Stealth (2017)", RAZER_BLADE_STEALTH_2017_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3909,7 +3909,7 @@ static const razer_device blade_stealth_late_2017_device = { "Razer Blade Stealth (Late 2017)", RAZER_BLADE_STEALTH_LATE_2017_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3944,7 +3944,7 @@ static const razer_device blade_stealth_2019_device = { "Razer Blade Stealth (2019)", RAZER_BLADE_STEALTH_2019_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 6, @@ -3979,7 +3979,7 @@ static const razer_device blade_stealth_late_2019_device = { "Razer Blade Stealth (Late 2019)", RAZER_BLADE_STEALTH_LATE_2019_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 1, @@ -4014,7 +4014,7 @@ static const razer_device blade_stealth_2020_device = { "Razer Blade Stealth (2020)", RAZER_BLADE_STEALTH_2020_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 1, @@ -4049,7 +4049,7 @@ static const razer_device blade_stealth_late_2020_device = { "Razer Blade Stealth (Late 2020)", RAZER_BLADE_STEALTH_LATE_2020_PID, - DEVICE_TYPE_KEYBOARD, + DEVICE_TYPE_LAPTOP, RAZER_MATRIX_TYPE_STANDARD, 0x3F, 1, @@ -8671,7 +8671,6 @@ const razer_device* razer_device_list[] = &blade_pro_late_2019_device, &blade_pro_17_2020_device, &blade_pro_17_2021_device, - &blade_stealth_2019_device, &blade_stealth_2016_device, &blade_stealth_late_2016_device, &blade_stealth_2017_device, diff --git a/Controllers/ViewSonicController/RGBController_XG270QG.cpp b/Controllers/ViewSonicController/RGBController_XG270QG.cpp index 5ca54eff..5826e609 100644 --- a/Controllers/ViewSonicController/RGBController_XG270QG.cpp +++ b/Controllers/ViewSonicController/RGBController_XG270QG.cpp @@ -11,7 +11,6 @@ #include #include "RGBController_XG270QG.h" -#include "LogManager.h" /**------------------------------------------------------------------*\ @name Viewsonic Monitor @@ -30,7 +29,7 @@ RGBController_XG270QG::RGBController_XG270QG(VS_XG270QG_Controller* controller_p name = "ViewSonic Elite XG270QG"; vendor = "ViewSonic"; - type = DEVICE_TYPE_ACCESSORY; + type = DEVICE_TYPE_MONITOR; description = "ViewSonic Monitor"; location = controller->GetLocation(); serial = controller->GetSerial(); diff --git a/Controllers/ViewSonicController/RGBController_XG270QG.h b/Controllers/ViewSonicController/RGBController_XG270QG.h index 380d68d7..e2ab0061 100644 --- a/Controllers/ViewSonicController/RGBController_XG270QG.h +++ b/Controllers/ViewSonicController/RGBController_XG270QG.h @@ -11,8 +11,6 @@ #pragma once -#include -#include #include "VS_XG270QG_Controller.h" #include "RGBController.h" diff --git a/RGBController/RGBController.h b/RGBController/RGBController.h index 939f77c3..999a8f15 100644 --- a/RGBController/RGBController.h +++ b/RGBController/RGBController.h @@ -212,6 +212,8 @@ enum DEVICE_TYPE_MICROPHONE, DEVICE_TYPE_ACCESSORY, DEVICE_TYPE_KEYPAD, + DEVICE_TYPE_LAPTOP, + DEVICE_TYPE_MONITOR, DEVICE_TYPE_UNKNOWN, }; diff --git a/qt/OpenRGBDialog/OpenRGBDialog.cpp b/qt/OpenRGBDialog/OpenRGBDialog.cpp index dad1d8cc..fbdb32d4 100644 --- a/qt/OpenRGBDialog/OpenRGBDialog.cpp +++ b/qt/OpenRGBDialog/OpenRGBDialog.cpp @@ -104,6 +104,12 @@ static int GetIcon(device_type type) case DEVICE_TYPE_KEYPAD: icon = OpenRGBFont::keypad; break; + case DEVICE_TYPE_LAPTOP: + icon = OpenRGBFont::laptop; + break; + case DEVICE_TYPE_MONITOR: + icon = OpenRGBFont::monitor; + break; default: icon = OpenRGBFont::unknown; break; diff --git a/qt/OpenRGBFont.h b/qt/OpenRGBFont.h index 415b1d0c..fc52f807 100644 --- a/qt/OpenRGBFont.h +++ b/qt/OpenRGBFont.h @@ -46,7 +46,9 @@ public: toolbox = 0xF019, unknown = 0xF01A, virtual_controller = 0xF01B, - usb = 0xF01C + usb = 0xF01C, + laptop = 0xF01D, + monitor = 0xF01E }; static QString icon(int); diff --git a/qt/fonts/OpenRGB.ttf b/qt/fonts/OpenRGB.ttf index a7ada68f2839b330881f7f14ffd3970e8864d36e..eb938035a2a17cb60405b11a70be32317b48bdb0 100644 GIT binary patch delta 686 zcmdmDbHuKmfsuiMftR6yftew|%`L=t$^M@A3=Hxb3=9l1{=xc2ZY~dJFfcGiFfcGA zBfl-8kfk7oBx1>UF z8V4@}1LF<`1_rO3{N%)pX}R+l7?^z+7#Lh~6DtZB3K>D_Ef^RW6!H>tQ#mrYPctw` z_b@OpITYjZXeNPe zlNfCo6(`#<#xlxHp2L{TtjVA``5&V$qugd4rWi&R?j79!Hg_;{iq|tUX#T&)yq~Fx zft!J!L7suZT+v8OgiTpdNzKGeSWr<=(ZtMH(MU{G5F%(A%j|B_xz37{C16%;>9ZV4(bOv$CO~G6Mqx6NBdet<3wG7BlcO z=rb?~E3t_RiijE4D;k-Z3Yw@XGb$>nnF=D?C2EXth&AJKAqfc~rdc5JU+2HOCZ3)q zOtV1bzq_>{_x#%gB5RofBnAI%2B~876_otP<7vX^3s$w+#4`lqI8Ycd@G-0dhvVeg zQpXfc8FUyF7>XG38S)uQ7#N)M3o45;(=$pGG?FzHj0}uSCpSsg2pTe&GU$S_5rYAP z5rgSuei;=`LsMN-U9cJ(nXQb9lRwGWu`tRp%1<_seIUSInwRNjVCVv+T_+33N$?=z HNnjfQE%Kfy delta 373 zcmX?Nx5cKOfsuiMftR6yftew|%`L=tb`QsS1_n6^1_lNh|6qM1H;`2U}QnSnu0fPsO5BR!`w zO@EPK90LP$2LppRM@DL5ic`xdN7CnL{jG`UWuM$m*o zm%)(1h(VXZh{1rth{0$wx2y`MiLRlMu91O}(PRtRt&H-M-^todHjsNTSwUWc2VtGx FG60g1TTK7} diff --git a/qt/fonts/README.md b/qt/fonts/README.md new file mode 100644 index 00000000..6feea42d --- /dev/null +++ b/qt/fonts/README.md @@ -0,0 +1,28 @@ +# OpenRGB Fonts + +This folder contains OpenRGB.ttf - a special font that contains all monochrome +icons used in OpenRGB. The icons are assembled into a font in order to simplify +rendering them in accordance with the desired color palette, as well as ensure +the vector scalable format is supported by the platform. + +The font is generated by a dedicated CI script located in: +https://gitlab.com/OpenRGBDevelopers/openrgb-icons + +Most icons are taken from the open library CSS.GG, and it is preferred that new +icons are chosen from that library instead of making new ones. + +In order to add a new icon, please do the following steps: +1) Choose the SVG icon in: https://github.com/astrit/css.gg/tree/main/icons/svg +2) Append the file name to the list in +https://gitlab.com/OpenRGBDevelopers/openrgb-icons/-/blob/main/OpenRGB.json +with a new glyph code. The code must be in the Unicode Private Use Area and it +is recommended to take the first available code after the last icon. +3) After changes were pushed to the `openrgb-icons` repo (or after a merge +request was filed), the CI script will generate a new TTF file that should be +placed in this folder, replacing the existing one +4) Add the new glyph code and it's name to the enumeration in +https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/qt/OpenRGBFont. +5) The icon is now available as a Unicode character, with the code you chose. + +In order for the icon to be displayed correctly, the font must be assigned +to the widget, through `OpenRGBFont::GetFont()`.