fdo#45671 set initial color for split buttons
This commit is contained in:
parent
4c40593e3e
commit
ae7c80640d
3 changed files with 34 additions and 2 deletions
|
@ -2231,6 +2231,14 @@ void SvxColorToolBoxControl::StateChanged(
|
|||
//========================================================================
|
||||
// class SvxColorExtToolBoxControl ----------------------------------------
|
||||
//========================================================================
|
||||
/* Note:
|
||||
The initial color shown on the button is set in /core/svx/source/tbxctrls/tbxcolorupdate.cxx
|
||||
(ToolboxButtonColorUpdater::ToolboxButtonColorUpdater()) .
|
||||
The initial color used by the button is set in /core/svx/source/tbxcntrls/tbcontrl.cxx
|
||||
(SvxColorExtToolBoxControl::SvxColorExtToolBoxControl())
|
||||
and in case of writer for text(background)color also in /core/sw/source/ui/docvw/edtwin.cxx
|
||||
(SwEditWin::aTextBackColor and SwEditWin::aTextBackColor)
|
||||
*/
|
||||
|
||||
SvxColorExtToolBoxControl::SvxColorExtToolBoxControl(
|
||||
sal_uInt16 nSlotId,
|
||||
|
@ -2252,11 +2260,13 @@ SvxColorExtToolBoxControl::SvxColorExtToolBoxControl(
|
|||
case SID_ATTR_CHAR_COLOR:
|
||||
addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Color" )));
|
||||
nMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW;
|
||||
mLastColor = COL_RED;
|
||||
break;
|
||||
|
||||
case SID_ATTR_CHAR_COLOR2:
|
||||
addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharColorExt" )));
|
||||
nMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW;
|
||||
mLastColor = COL_RED;
|
||||
break;
|
||||
|
||||
case SID_BACKGROUND_COLOR:
|
||||
|
@ -2264,11 +2274,13 @@ SvxColorExtToolBoxControl::SvxColorExtToolBoxControl(
|
|||
default:
|
||||
addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharBackgroundExt" )));
|
||||
nMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW;
|
||||
mLastColor = COL_YELLOW;
|
||||
break;
|
||||
|
||||
case SID_FRAME_LINECOLOR:
|
||||
addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FrameLineColor" )));
|
||||
nMode = 0;
|
||||
mLastColor = COL_BLUE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,14 @@ namespace svx
|
|||
//====================================================================
|
||||
//= ToolboxButtonColorUpdater
|
||||
//====================================================================
|
||||
/* Note:
|
||||
The initial color shown on the button is set in /core/svx/source/tbxctrls/tbxcolorupdate.cxx
|
||||
(ToolboxButtonColorUpdater::ToolboxButtonColorUpdater()) .
|
||||
The initial color used by the button is set in /core/svx/source/tbxcntrls/tbcontrl.cxx
|
||||
(SvxColorExtToolBoxControl::SvxColorExtToolBoxControl())
|
||||
and in case of writer for text(background)color also in /core/sw/source/ui/docvw/edtwin.cxx
|
||||
(SwEditWin::aTextBackColor and SwEditWin::aTextBackColor)
|
||||
*/
|
||||
|
||||
ToolboxButtonColorUpdater::ToolboxButtonColorUpdater(
|
||||
sal_uInt16 nId,
|
||||
|
@ -64,13 +72,17 @@ namespace svx
|
|||
{
|
||||
case SID_ATTR_CHAR_COLOR :
|
||||
case SID_ATTR_CHAR_COLOR2 :
|
||||
Update( COL_BLACK );
|
||||
Update( COL_RED );
|
||||
break;
|
||||
case SID_FRAME_LINECOLOR :
|
||||
Update( COL_BLUE );
|
||||
break;
|
||||
case SID_ATTR_CHAR_COLOR_BACKGROUND :
|
||||
case SID_BACKGROUND_COLOR :
|
||||
Update( COL_YELLOW );
|
||||
break;
|
||||
default :
|
||||
Update( COL_GRAY );
|
||||
Update( COL_TRANSPARENT );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -176,6 +176,14 @@ QuickHelpData* SwEditWin::pQuickHlpData = 0;
|
|||
|
||||
long SwEditWin::nDDStartPosY = 0;
|
||||
long SwEditWin::nDDStartPosX = 0;
|
||||
/* Note:
|
||||
The initial color shown on the button is set in /core/svx/source/tbxctrls/tbxcolorupdate.cxx
|
||||
(ToolboxButtonColorUpdater::ToolboxButtonColorUpdater()) .
|
||||
The initial color used by the button is set in /core/svx/source/tbxcntrls/tbcontrl.cxx
|
||||
(SvxColorExtToolBoxControl::SvxColorExtToolBoxControl())
|
||||
and in case of writer for text(background)color also in /core/sw/source/ui/docvw/edtwin.cxx
|
||||
(SwEditWin::aTextBackColor and SwEditWin::aTextBackColor)
|
||||
*/
|
||||
Color SwEditWin::aTextBackColor(COL_YELLOW);
|
||||
Color SwEditWin::aTextColor(COL_RED);
|
||||
sal_Bool SwEditWin::bTransparentBackColor = sal_False; // background not transparent
|
||||
|
|
Loading…
Reference in a new issue