diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-12-15 15:29:46 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-12-15 15:29:46 -0500 |
commit | 03cfe128b958549bc4491261266eb94c2cf36d70 (patch) | |
tree | ccb23dd58ba32779c128b824093a43042857dbbf /sc/source/ui | |
parent | 08a9e0c18e1b15e221faeaee98a1326e95a797cf (diff) |
A little UI tweak & code cleanup.
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/dbgui/dpuiglobal.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/fieldwnd.cxx | 32 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pvlaydlg.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/fieldwnd.hxx | 2 |
4 files changed, 23 insertions, 14 deletions
diff --git a/sc/source/ui/dbgui/dpuiglobal.hxx b/sc/source/ui/dbgui/dpuiglobal.hxx index 5fd4ed2ab585..10d95e6dea17 100644 --- a/sc/source/ui/dbgui/dpuiglobal.hxx +++ b/sc/source/ui/dbgui/dpuiglobal.hxx @@ -28,8 +28,6 @@ #ifndef __SC_DPUIGLOBAL_HXX__ #define __SC_DPUIGLOBAL_HXX__ -#define MAX_PAGEFIELDS 10 // maximum count of fields for page area - #define OUTER_MARGIN_HOR 4 #define OUTER_MARGIN_VER 4 #define DATA_FIELD_BTN_GAP 2 // must be an even number diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx index d24ebae330a1..e2a69603ed42 100644 --- a/sc/source/ui/dbgui/fieldwnd.cxx +++ b/sc/source/ui/dbgui/fieldwnd.cxx @@ -396,15 +396,17 @@ void ScDPFieldControlBase::KeyInput( const KeyEvent& rKEvt ) bKeyEvaluated = true; switch( nCode ) { - case KEY_UP: MoveSelection( nCode, 0, -1 ); break; - case KEY_DOWN: MoveSelection( nCode, 0, 1 ); break; - case KEY_LEFT: MoveSelection( nCode, -1, 0 ); break; - case KEY_RIGHT: MoveSelection( nCode, 1, 0 ); break; - case KEY_HOME: SetSelectionHome(); break; - case KEY_END: SetSelectionEnd(); break; + case KEY_UP: MoveSelection( 0, -1 ); break; + case KEY_DOWN: MoveSelection( 0, 1 ); break; + case KEY_LEFT: MoveSelection( -1, 0 ); break; + case KEY_RIGHT: MoveSelection( 1, 0 ); break; + case KEY_HOME: SetSelectionHome(); break; + case KEY_END: SetSelectionEnd(); break; case KEY_DELETE: - mpDlg->NotifyRemoveField( GetFieldType(), mnFieldSelected ); break; - default: bKeyEvaluated = false; + mpDlg->NotifyRemoveField( GetFieldType(), mnFieldSelected ); + break; + default: + bKeyEvaluated = false; } } @@ -504,8 +506,16 @@ void ScDPFieldControlBase::DrawBackground( OutputDevice& rDev ) Point aPos0; Size aSize( GetSizePixel() ); - rDev.SetLineColor( aWinTextColor ); - rDev.SetFillColor( aWinColor ); + if (mpCaption) + { + rDev.SetLineColor( aWinTextColor ); + rDev.SetFillColor( aWinColor ); + } + else + { + rDev.SetLineColor( aFaceColor ); + rDev.SetFillColor( aFaceColor ); + } rDev.DrawRect( Rectangle( aPos0, aSize ) ); rDev.SetTextColor( aWinTextColor ); @@ -676,7 +686,7 @@ void ScDPFieldControlBase::SetSelectionEnd() } } -void ScDPFieldControlBase::MoveSelection( USHORT nKeyCode, SCsCOL nDX, SCsROW nDY ) +void ScDPFieldControlBase::MoveSelection(SCsCOL nDX, SCsROW nDY) { size_t nNewIndex = CalcNewFieldIndex( nDX, nDY ); SetSelection( nNewIndex ); diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 46062838fa4a..e2ee70127373 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -1360,6 +1360,7 @@ void ScDPLayoutDlg::CalcWndSizes() // selection area long nLineSize = 10; // number of fields per column. long nH = OUTER_MARGIN_VER + nLineSize* nFldH + nLineSize * ROW_FIELD_BTN_GAP; + nH += ROW_FIELD_BTN_GAP; nH += GetSettings().GetStyleSettings().GetScrollBarSize() + OUTER_MARGIN_VER; aWndSelect.SetSizePixel( Size(2 * nFldW + ROW_FIELD_BTN_GAP + 10, nH)); diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx index 67f16c22bca9..21eda91b0ed3 100644 --- a/sc/source/ui/inc/fieldwnd.hxx +++ b/sc/source/ui/inc/fieldwnd.hxx @@ -211,7 +211,7 @@ private: /** Sets selection to last field. */ void SetSelectionEnd(); /** Sets selection to new position relative to current. */ - void MoveSelection( USHORT nKeyCode, SCsCOL nDX, SCsROW nDY ); + void MoveSelection( SCsCOL nDX, SCsROW nDY ); private: typedef ::std::vector<Window*> Paintables; |