From f30938d0de69be208a70b64ed562b730b7264fcf Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 2 Jan 2019 01:00:05 +0100 Subject: [PATCH] lcd4l-setup: use new GetMaxBrightness() function Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6d3abd99aa1ac932484f4e791cfa10879d05094e Author: vanhofen Date: 2019-01-02 (Wed, 02 Jan 2019) Origin message was: ------------------ - lcd4l-setup: use new GetMaxBrightness() function --- src/gui/lcd4l_setup.cpp | 12 +++--------- src/gui/lcd4l_setup.h | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/gui/lcd4l_setup.cpp b/src/gui/lcd4l_setup.cpp index 3de15e86e..3e20009e0 100644 --- a/src/gui/lcd4l_setup.cpp +++ b/src/gui/lcd4l_setup.cpp @@ -4,7 +4,7 @@ Copyright (C) 2012 'defans' Homepage: http://www.bluepeercrew.us/ - Copyright (C) 2012-2016 'vanhofen' + Copyright (C) 2012-2018 'vanhofen' Homepage: http://www.neutrino-images.de/ Modded (C) 2016 'TangoCash' @@ -171,17 +171,11 @@ int CLCD4lSetup::show() mc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_SKIN_RADIO); lcd4lSetup->addItem(mc); - if (g_settings.lcd4l_display_type == CLCD4l::SAMSUNG) - nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS, (int *)&temp_lcd4l_brightness, true, 1, 10, this); - else - nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS, (int *)&temp_lcd4l_brightness, true, 1, 7, this); + nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS, (int *)&temp_lcd4l_brightness, true, 1, LCD4l->GetMaxBrightness(), this); nc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_BRIGHTNESS); lcd4lSetup->addItem(nc); - if (g_settings.lcd4l_display_type == CLCD4l::SAMSUNG) - nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS_STANDBY, (int *)&g_settings.lcd4l_brightness_standby, true, 1, 10, this); - else - nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS_STANDBY, (int *)&g_settings.lcd4l_brightness_standby, true, 1, 7, this); + nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS_STANDBY, (int *)&g_settings.lcd4l_brightness_standby, true, 1, LCD4l->GetMaxBrightness(), this); nc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_BRIGHTNESS_STANDBY); lcd4lSetup->addItem(nc); diff --git a/src/gui/lcd4l_setup.h b/src/gui/lcd4l_setup.h index 68ac7c801..803c73499 100644 --- a/src/gui/lcd4l_setup.h +++ b/src/gui/lcd4l_setup.h @@ -4,7 +4,7 @@ Copyright (C) 2012 'defans' Homepage: http://www.bluepeercrew.us/ - Copyright (C) 2012-2016 'vanhofen' + Copyright (C) 2012-2018 'vanhofen' Homepage: http://www.neutrino-images.de/ Modded (C) 2016 'TangoCash'