From 4ecea7806d45ca40b370b13da6fe4781ef04367d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 May 2013 17:05:28 +0300 Subject: add option to override detected screen density. --- src/gui/setup_other.cpp | 20 +++++++++++++++++++- src/gui/setup_other.h | 4 +--- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'src/gui') diff --git a/src/gui/setup_other.cpp b/src/gui/setup_other.cpp index c4ce2a500..bc4bf8f24 100644 --- a/src/gui/setup_other.cpp +++ b/src/gui/setup_other.cpp @@ -58,10 +58,24 @@ static const char *const proxyTypeList[] = N_("SOCKS5 hostname") }; +static const int densityListSize = 7; + +static const char *const densityList[] = +{ + N_("default"), + N_("low"), + N_("medium"), + N_("tv"), + N_("high"), + N_("xhigh"), + N_("xxhigh") +}; + Setup_Other::Setup_Other(const Widget2 *const widget) : SetupTabScroll(widget), mProxyTypeList(new NamesModel), - mShortcutsList(new NamesModel) + mShortcutsList(new NamesModel), + mDensityList(new NamesModel) { setName(_("Misc")); @@ -275,6 +289,10 @@ Setup_Other::Setup_Other(const Widget2 *const widget) : new SetupItemCheckBox(_("Show background"), "", "showBackground", this, "showBackgroundEvent"); + mDensityList->fillFromArray(&densityList[0], densityListSize); + new SetupItemDropDown(_("Screen density override"), "", + "screenDensity", this, "screenDensityEvent", mDensityList, 100); + setDimension(gcn::Rectangle(0, 0, 550, 350)); } diff --git a/src/gui/setup_other.h b/src/gui/setup_other.h index 2f0fdaf04..cc20ad2d9 100644 --- a/src/gui/setup_other.h +++ b/src/gui/setup_other.h @@ -39,15 +39,13 @@ class Setup_Other final : public SetupTabScroll A_DELETE_COPY(Setup_Other) ~Setup_Other(); - void apply(); - void externalUpdated(); protected: NamesModel *mProxyTypeList; - NamesModel *mShortcutsList; + NamesModel *mDensityList; }; #endif -- cgit v1.2.3-70-g09d2