diff --git a/menu/menu_setting.c b/menu/menu_setting.c index c0f3e9b34c..944173d69c 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -2474,6 +2474,10 @@ void menu_settings_list_current_add_range( { unsigned idx = list_info->index - 1; + if ((*list)[idx].type == ST_FLOAT) + (*list)[list_info->index - 1].ui_type + = ST_UI_TYPE_FLOAT_SLIDER_AND_SPINBOX; + (*list)[idx].min = min; (*list)[idx].step = step; (*list)[idx].max = max; diff --git a/setting_list.c b/setting_list.c index 2154558ab0..4ec80bc339 100644 --- a/setting_list.c +++ b/setting_list.c @@ -1950,7 +1950,7 @@ bool CONFIG_FLOAT( if (!(settings_list_append(list, list_info))) return false; (*list)[list_info->index++] = value; - (*list)[list_info->index - 1].ui_type = ST_UI_TYPE_FLOAT_SLIDER_AND_SPINBOX; + (*list)[list_info->index - 1].ui_type = ST_UI_TYPE_FLOAT_SPINBOX; #ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); diff --git a/ui/drivers/qt/options/osd.cpp b/ui/drivers/qt/options/osd.cpp index 311f07c894..1c77393c47 100644 --- a/ui/drivers/qt/options/osd.cpp +++ b/ui/drivers/qt/options/osd.cpp @@ -25,19 +25,18 @@ NotificationsPage::NotificationsPage(QObject *parent) : QWidget *NotificationsPage::widget() { - QWidget *widget = new QWidget; - QVBoxLayout *layout = new QVBoxLayout; - + QWidget *widget = new QWidget; + QVBoxLayout *layout = new QVBoxLayout; CheckableSettingsGroup *notificationsGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_VIDEO_FONT_ENABLE); - CheckableSettingsGroup *bgGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_ENABLE); + CheckableSettingsGroup *bgGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_ENABLE); - notificationsGroup->addCheckBox(MENU_ENUM_LABEL_FPS_SHOW); - notificationsGroup->addCheckBox(MENU_ENUM_LABEL_FRAMECOUNT_SHOW); - notificationsGroup->addCheckBox(MENU_ENUM_LABEL_MEMORY_SHOW); - notificationsGroup->addFontSelector(MENU_ENUM_LABEL_VIDEO_FONT_PATH); - notificationsGroup->addFloatSpinBox(MENU_ENUM_LABEL_VIDEO_FONT_SIZE); - notificationsGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X); - notificationsGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y); + notificationsGroup->add(MENU_ENUM_LABEL_FPS_SHOW); + notificationsGroup->add(MENU_ENUM_LABEL_FRAMECOUNT_SHOW); + notificationsGroup->add(MENU_ENUM_LABEL_MEMORY_SHOW); + notificationsGroup->add(MENU_ENUM_LABEL_VIDEO_FONT_PATH); + notificationsGroup->add(MENU_ENUM_LABEL_VIDEO_FONT_SIZE); + notificationsGroup->add(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X); + notificationsGroup->add(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y); notificationsGroup->addRow("Notification Color: ", new FloatColorButton( MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_RED, MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_GREEN, @@ -68,22 +67,22 @@ OverlayPage::OverlayPage(QObject *parent) : QWidget *OverlayPage::widget() { - QWidget *widget = new QWidget; - QVBoxLayout *layout = new QVBoxLayout; + QWidget *widget = new QWidget; + QVBoxLayout *layout = new QVBoxLayout; CheckableSettingsGroup *overlayGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE); - CheckableSettingsGroup *inputsGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS); + CheckableSettingsGroup *inputsGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS); - overlayGroup->addCheckBox(MENU_ENUM_LABEL_OVERLAY_AUTOLOAD_PREFERRED); - overlayGroup->addCheckBox(MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU); + overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_AUTOLOAD_PREFERRED); + overlayGroup->add(MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU); inputsGroup->addUIntSpinBox(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT); overlayGroup->addRow(inputsGroup); - overlayGroup->addFileSelector(MENU_ENUM_LABEL_OVERLAY_PRESET); - overlayGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_OVERLAY_OPACITY); - overlayGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_OVERLAY_SCALE); + overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_PRESET); + overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_OPACITY); + overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_SCALE); layout->addWidget(overlayGroup); diff --git a/ui/drivers/qt/settingswidgets.h b/ui/drivers/qt/settingswidgets.h index 7f24203389..201233d97e 100644 --- a/ui/drivers/qt/settingswidgets.h +++ b/ui/drivers/qt/settingswidgets.h @@ -181,7 +181,7 @@ public: this->addFloatSliderAndSpinBox(enum_idx); break; case ST_UI_TYPE_SIZE_SPINBOX: - this->addSizeSpinBox(enum_idx); + /* TODO/FIXME */ break; case ST_UI_TYPE_BIND_BUTTON: /* TODO/FIXME - Why is the returntype void here and bool