mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
No longer using extra icons for hilighted and disabled state, but drawing them with toolbox transform modes.
This commit is contained in:
parent
bc4117282b
commit
a153945b9c
@ -84,6 +84,7 @@ CButton::CButton(LStream *inStream)
|
||||
{
|
||||
mButtonMask = NULL;
|
||||
mGraphicHandle = NULL;
|
||||
mIconTransform = kTransformNone;
|
||||
SetTrackInside(false);
|
||||
|
||||
*inStream >> mTrackBehaviour;
|
||||
@ -342,7 +343,7 @@ void CButton::DrawButtonGraphic(void)
|
||||
else if (mGraphicType == 'ICN#')
|
||||
{
|
||||
CIconFamily theFamily(GetGraphicID());
|
||||
theFamily.Plot(mCachedGraphicFrame, mGraphicAlignment);
|
||||
theFamily.Plot(mCachedGraphicFrame, mGraphicAlignment, mIconTransform);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -119,6 +119,7 @@ class CButton : public LControl, public MPaneEnablerPolicy
|
||||
Int16 mGraphicPadPixels;
|
||||
|
||||
CIconHandle mGraphicHandle;
|
||||
IconTransformType mIconTransform;
|
||||
|
||||
private:
|
||||
virtual void HandleEnablingPolicy();
|
||||
|
@ -91,27 +91,32 @@ void CPatternButton::DrawButtonContent(void)
|
||||
|
||||
void CPatternButton::DrawButtonGraphic(void)
|
||||
{
|
||||
ResIDT theSaveID = GetGraphicID();
|
||||
ResIDT theNewID = theSaveID;
|
||||
|
||||
bool useMouseOverIcon = false;
|
||||
mIconTransform = kTransformNone;
|
||||
|
||||
if (IsEnabled() && IsActive())
|
||||
{
|
||||
{
|
||||
if (!IsBehaviourButton() && (GetValue() == Button_On))
|
||||
{
|
||||
// do something different if IsTrackInside()
|
||||
theNewID += 2;
|
||||
//theNewID += 2;
|
||||
}
|
||||
else if (IsTrackInside())
|
||||
theNewID += 3;
|
||||
mIconTransform = kTransformSelected;
|
||||
else if (IsMouseInFrame())
|
||||
theNewID += 2;
|
||||
}
|
||||
useMouseOverIcon = true;
|
||||
}
|
||||
else
|
||||
theNewID += 1;
|
||||
mIconTransform = kTransformDisabled;
|
||||
|
||||
SetGraphicID(theNewID);
|
||||
ResIDT theIconID;
|
||||
if ( useMouseOverIcon ) {
|
||||
theIconID = GetGraphicID();
|
||||
SetGraphicID(theIconID + 2);
|
||||
}
|
||||
CToolbarButton::DrawButtonGraphic();
|
||||
SetGraphicID(theSaveID);
|
||||
if ( useMouseOverIcon )
|
||||
SetGraphicID(theIconID);
|
||||
}
|
||||
|
||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
||||
|
Loading…
Reference in New Issue
Block a user