[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - 2 commits - cui/source svx/source
Eike Rathke
erack at redhat.com
Fri May 23 08:52:20 PDT 2014
cui/source/options/optgdlg.cxx | 12 ++++--------
svx/source/dialog/langbox.cxx | 19 +++++++++++++++++++
2 files changed, 23 insertions(+), 8 deletions(-)
New commits:
commit 524a83a3217bad4dcce96c2cddc9bf9c4b0f2292
Author: Eike Rathke <erack at redhat.com>
Date: Fri May 23 17:46:41 2014 +0200
make this a little less confusing
... and change to a friendlier red for invalid patterns.
Change-Id: I19488abd496b144439d7918dc31cfd3f5f4fef92
(cherry picked from commit 3d79d4ae3dff4305fa0808c34d3fb14bc0fe1e82)
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index ffa6f7e..81cf5d5 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1762,16 +1762,12 @@ IMPL_LINK( OfaLanguagesTabPage, DatePatternsHdl, Edit*, pEd )
}
else
{
- // color to use as background for an invalid pattern
- #define INVALID_PATTERN_BACKGROUND_COLOR ::Color(0xff6563)
#if 0
- // color to use as foreground for an invalid pattern
- #define INVALID_PATTERN_FOREGROUND_COLOR Color(COL_WHITE)
- //! Gives white on white!?!
- pEd->SetControlBackground( INVALID_PATTERN_BACKGROUND_COLOR);
- pEd->SetControlForeground( INVALID_PATTERN_FOREGROUND_COLOR);
+ //! Gives white on white!?! instead of white on reddish.
+ pEd->SetControlBackground( ::Color( RGB_COLORDATA( 0xff, 0x65, 0x63)));
+ pEd->SetControlForeground( ::Color( COL_WHITE));
#else
- pEd->SetControlForeground( INVALID_PATTERN_BACKGROUND_COLOR);
+ pEd->SetControlForeground( ::Color( RGB_COLORDATA( 0xf0, 0, 0)));
#endif
}
return 0;
commit fcf07f67958672088c346fe0ed5f41130c905721
Author: Eike Rathke <erack at redhat.com>
Date: Fri May 23 17:17:18 2014 +0200
feedback color indicator for invalid tags
Change-Id: I235e32587779369c139aedd1961b37d8fcad8f53
(cherry picked from commit 04ccece7299ac1e57488e5ef36af122edeec2aae)
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 028e33d..fc6262c 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -704,6 +704,7 @@ sal_Int32 SvxLanguageComboBox::ImplGetSavedValue() const
IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ )
{
+ EditedAndValid eOldState = meEditedAndValid;
OUString aStr( vcl::I18nHelper::filterFormattingChars( GetText()));
if (aStr.isEmpty())
meEditedAndValid = EDITED_INVALID;
@@ -741,6 +742,24 @@ IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ )
}
}
}
+ if (eOldState != meEditedAndValid)
+ {
+ if (meEditedAndValid == EDITED_INVALID)
+ {
+#if 0
+ //! Gives white on white!?! instead of white on reddish.
+ SetControlBackground( ::Color( RGB_COLORDATA( 0xff, 0x65, 0x63)));
+ SetControlForeground( ::Color( COL_WHITE));
+#else
+ SetControlForeground( ::Color( RGB_COLORDATA( 0xf0, 0, 0)));
+#endif
+ }
+ else
+ {
+ SetControlForeground();
+ SetControlBackground();
+ }
+ }
return 0;
}
More information about the Libreoffice-commits
mailing list