Explorar el Código

frontend/components: Remove NonCheckableButton

The NonCheckableButton class was previously used for situations where a
*checkable* button was meant to not be checkable by the *user*, but only
through code. This was useful mostly as a styling tool (and to confuse
developers like me as to what it actually did).

The disadvantage is that such a button - a button that is actually
checkable (has the checkable attribute) but ignores the user - still
gets recognized by QAccessible as a checkable button, which has
accessibility issues when used like a normal button (see QTBUG-110737).

We can still get the styling effect on *actually* uncheckable buttons by
giving them a class, so this widget should not be necessary.
gxalpha hace 9 meses
padre
commit
28960a48a7
Se han modificado 2 ficheros con 0 adiciones y 19 borrados
  1. 0 1
      frontend/cmake/ui-components.cmake
  2. 0 18
      frontend/components/NonCheckableButton.hpp

+ 0 - 1
frontend/cmake/ui-components.cmake

@@ -45,7 +45,6 @@ target_sources(
     components/Multiview.cpp
     components/Multiview.hpp
     components/MuteCheckBox.hpp
-    components/NonCheckableButton.hpp
     components/OBSAdvAudioCtrl.cpp
     components/OBSAdvAudioCtrl.hpp
     components/OBSPreviewScalingComboBox.cpp

+ 0 - 18
frontend/components/NonCheckableButton.hpp

@@ -1,18 +0,0 @@
-#pragma once
-
-#include <QPushButton>
-#include <QString>
-#include <QWidget>
-
-/* Button with its checked property not changed when clicked.
- * Meant to be used in situations where manually changing the property
- * is always preferred. */
-class NonCheckableButton : public QPushButton {
-	Q_OBJECT
-
-	inline void nextCheckState() override {}
-
-public:
-	inline NonCheckableButton(QWidget *parent = nullptr) : QPushButton(parent) {}
-	inline NonCheckableButton(const QString &text, QWidget *parent = nullptr) : QPushButton(text, parent) {}
-};