mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
UI: Remove old ComboBoxIgnoreScroll
This commit is contained in:
parent
e33b7d2dab
commit
e840966968
@ -160,8 +160,6 @@ target_sources(
|
||||
audio-encoders.cpp
|
||||
audio-encoders.hpp
|
||||
balance-slider.hpp
|
||||
combobox-ignorewheel.cpp
|
||||
combobox-ignorewheel.hpp
|
||||
clickable-label.hpp
|
||||
double-slider.cpp
|
||||
double-slider.hpp
|
||||
|
@ -1,14 +0,0 @@
|
||||
#include "combobox-ignorewheel.hpp"
|
||||
|
||||
ComboBoxIgnoreScroll::ComboBoxIgnoreScroll(QWidget *parent) : QComboBox(parent)
|
||||
{
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
}
|
||||
|
||||
void ComboBoxIgnoreScroll::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
if (!hasFocus())
|
||||
event->ignore();
|
||||
else
|
||||
QComboBox::wheelEvent(event);
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QInputEvent>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
class ComboBoxIgnoreScroll : public QComboBox {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ComboBoxIgnoreScroll(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
virtual void wheelEvent(QWheelEvent *event) override;
|
||||
};
|
@ -42,8 +42,6 @@ target_sources(
|
||||
${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.hpp
|
||||
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.cpp
|
||||
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/combobox-ignorewheel.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/combobox-ignorewheel.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
|
||||
|
@ -27,8 +27,6 @@ target_sources(
|
||||
DecklinkOutputUI.h
|
||||
decklink-ui-main.cpp
|
||||
decklink-ui-main.h
|
||||
${CMAKE_SOURCE_DIR}/UI/combobox-ignorewheel.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/combobox-ignorewheel.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
|
||||
|
@ -27,8 +27,6 @@ target_sources(
|
||||
output-timer.hpp
|
||||
tool-helpers.hpp
|
||||
output-timer.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/combobox-ignorewheel.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/combobox-ignorewheel.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/horizontal-scroll-area.cpp
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "double-slider.hpp"
|
||||
#include "slider-ignorewheel.hpp"
|
||||
#include "spinbox-ignorewheel.hpp"
|
||||
#include "combobox-ignorewheel.hpp"
|
||||
#include "qt-wrappers.hpp"
|
||||
#include "properties-view.hpp"
|
||||
#include "properties-view.moc.hpp"
|
||||
@ -532,7 +531,7 @@ static string from_obs_data_autoselect(obs_data_t *data, const char *name,
|
||||
QWidget *OBSPropertiesView::AddList(obs_property_t *prop, bool &warning)
|
||||
{
|
||||
const char *name = obs_property_name(prop);
|
||||
QComboBox *combo = new ComboBoxIgnoreScroll();
|
||||
QComboBox *combo = new QComboBox();
|
||||
obs_combo_type type = obs_property_list_type(prop);
|
||||
obs_combo_format format = obs_property_list_format(prop);
|
||||
size_t count = obs_property_list_item_count(prop);
|
||||
@ -972,7 +971,7 @@ CreateSimpleFPSValues(OBSFrameRatePropertyWidget *fpsProps, bool &selected,
|
||||
auto items = vector<common_frame_rate>{};
|
||||
items.reserve(sizeof(common_fps) / sizeof(common_frame_rate));
|
||||
|
||||
auto combo = fpsProps->simpleFPS = new ComboBoxIgnoreScroll{};
|
||||
auto combo = fpsProps->simpleFPS = new QComboBox();
|
||||
|
||||
combo->addItem("", QVariant::fromValue(make_fps(0, 0)));
|
||||
for (const auto &fps : common_fps) {
|
||||
@ -1054,7 +1053,7 @@ static QWidget *CreateRationalFPS(OBSFrameRatePropertyWidget *fpsProps,
|
||||
auto str = QTStr("Basic.PropertiesView.FPS.ValidFPSRanges");
|
||||
auto rlabel = new QLabel{str};
|
||||
|
||||
auto combo = fpsProps->fpsRange = new ComboBoxIgnoreScroll{};
|
||||
auto combo = fpsProps->fpsRange = new QComboBox();
|
||||
auto convert_fps = media_frames_per_second_to_fps;
|
||||
//auto convert_fi = media_frames_per_second_to_frame_interval;
|
||||
|
||||
@ -1105,7 +1104,7 @@ CreateFrameRateWidget(obs_property_t *prop, bool &warning, const char *option,
|
||||
|
||||
swap(widget->fps_ranges, fps_ranges);
|
||||
|
||||
auto combo = widget->modeSelect = new ComboBoxIgnoreScroll{};
|
||||
auto combo = widget->modeSelect = new QComboBox();
|
||||
combo->addItem(QTStr("Basic.PropertiesView.FPS.Simple"),
|
||||
QVariant::fromValue(frame_rate_tag::simple()));
|
||||
combo->addItem(QTStr("Basic.PropertiesView.FPS.Rational"),
|
||||
|
Loading…
Reference in New Issue
Block a user