summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2018-04-17 17:26:33 +0200
committerHeiko Tietze <tietze.heiko@gmail.com>2018-04-18 10:32:39 +0200
commit12e3f64f270d464313176d4936ea811b45fb750e (patch)
tree6acc8e064611d34b833b0878d31e32026b7d8a65 /vcl
parented74986b212ca04cf7a45e4eb15073f0a2db1d14 (diff)
tdf#75398 - Replace hicontrast by Sifr
Change-Id: Idd581cb73d0d32d808177f86beaf50dcc6bf53c1 Reviewed-on: https://gerrit.libreoffice.org/53053 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/app/test_IconThemeInfo.cxx13
-rw-r--r--vcl/qa/cppunit/app/test_IconThemeSelector.cxx4
-rw-r--r--vcl/source/app/IconThemeInfo.cxx10
3 files changed, 5 insertions, 22 deletions
diff --git a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
index b6053745a01a..e93c841824c5 100644
--- a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
@@ -36,9 +36,6 @@ class IconThemeInfoTest : public CppUnit::TestFixture
ThemeIdIsDetectedFromFileNameWithUnderscore();
void
- DisplayNameForHicontrastIsHighContrast();
-
- void
ExceptionIsThrownWhenIdCannotBeDetermined1();
void
@@ -50,7 +47,6 @@ class IconThemeInfoTest : public CppUnit::TestFixture
CPPUNIT_TEST(ThemeIdIsDetectedFromFileNameWithUnderscore);
CPPUNIT_TEST(ImagesZipIsNotValid);
CPPUNIT_TEST(ImagesOxygenZipIsValid);
- CPPUNIT_TEST(DisplayNameForHicontrastIsHighContrast);
CPPUNIT_TEST(ExceptionIsThrownWhenIdCannotBeDetermined1);
CPPUNIT_TEST(ExceptionIsThrownWhenIdCannotBeDetermined2);
@@ -117,15 +113,6 @@ IconThemeInfoTest::ExceptionIsThrownWhenIdCannotBeDetermined2()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception was thrown", true, thrown);
}
-void
-IconThemeInfoTest::DisplayNameForHicontrastIsHighContrast()
-{
- OUString const id("hicontrast");
- OUString const expected("High Contrast");
- OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName(id);
- CPPUNIT_ASSERT_EQUAL(expected, displayName);
-}
-
// Put the test suite in the registry
CPPUNIT_TEST_SUITE_REGISTRATION(IconThemeInfoTest);
diff --git a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
index f2f8ca5d3369..3b6c53d3278f 100644
--- a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
@@ -82,7 +82,7 @@ IconThemeSelectorTest::GetFakeInstalledThemes()
r.push_back(a);
a.mThemeId = "elementary";
r.push_back(a);
- a.mThemeId = "hicontrast";
+ a.mThemeId = "sifr";
r.push_back(a);
return r;
}
@@ -124,7 +124,7 @@ IconThemeSelectorTest::ThemeIsOverriddenByHighContrastMode()
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
OUString selected = s.SelectIconTheme(themes, "breeze");
CPPUNIT_ASSERT_EQUAL_MESSAGE("'breeze' theme is overridden by high contrast mode",
- OUString("hicontrast"), selected);
+ OUString("sifr"), selected);
s.SetUseHighContrastTheme(false);
selected = s.SelectIconTheme(themes, "breeze");
CPPUNIT_ASSERT_EQUAL_MESSAGE("'breeze' theme is no longer overridden by high contrast mode",
diff --git a/vcl/source/app/IconThemeInfo.cxx b/vcl/source/app/IconThemeInfo.cxx
index 12899ee18b2a..c4c2e647e5eb 100644
--- a/vcl/source/app/IconThemeInfo.cxx
+++ b/vcl/source/app/IconThemeInfo.cxx
@@ -13,14 +13,13 @@
#include <stdexcept>
#include <algorithm>
-// constants for theme ids and display names. Only the theme id for hicontrast is used
+// constants for theme ids and display names. Only the theme id for high contrast is used
// outside of this class and hence made public.
-const OUStringLiteral vcl::IconThemeInfo::HIGH_CONTRAST_ID("hicontrast");
+const OUStringLiteral vcl::IconThemeInfo::HIGH_CONTRAST_ID("sifr");
namespace {
-static const OUStringLiteral HIGH_CONTRAST_DISPLAY_NAME("High Contrast");
static const OUStringLiteral BREEZE_DARK_ID("breeze_dark");
static const OUStringLiteral BREEZE_DARK_DISPLAY_NAME("Breeze Dark");
static const OUStringLiteral SIFR_DARK_ID("sifr_dark");
@@ -126,10 +125,7 @@ IconThemeInfo::ThemeIdToDisplayName(const OUString& themeId)
}
// special cases
- if (themeId.equalsIgnoreAsciiCase(HIGH_CONTRAST_ID)) {
- return HIGH_CONTRAST_DISPLAY_NAME;
- }
- else if (themeId.equalsIgnoreAsciiCase(BREEZE_DARK_ID)) {
+ if (themeId.equalsIgnoreAsciiCase(BREEZE_DARK_ID)) {
return BREEZE_DARK_DISPLAY_NAME;
}
else if (themeId.equalsIgnoreAsciiCase(SIFR_DARK_ID)) {