Make width of titlebar spacers default to half width of normal buttons,

not some random tiny sizes or even zero. Maybe could need small tweaking
here or there, but a spacer is supposed to make at least some space.


svn path=/trunk/KDE/kdebase/workspace/; revision=743034
icc-effect-5.14.5
Luboš Luňák 2007-11-29 18:37:52 +00:00
parent 3efc18c3b9
commit 59e845e4e6
9 changed files with 2 additions and 27 deletions

View File

@ -835,10 +835,6 @@ int KDE2Client::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCo
case LM_ButtonSpacing:
return 0;
case LM_ExplicitButtonSpacer:
if ( !isToolWindow() )
return borderWidth/2;
// fall through
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}

View File

@ -432,9 +432,6 @@ int LaptopClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const K
case LM_ButtonSpacing:
return 0;
case LM_ExplicitButtonSpacer:
return 0;
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}

View File

@ -522,9 +522,6 @@ int ModernSys::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCom
case LM_ButtonSpacing:
return 1;
case LM_ExplicitButtonSpacer:
return 3;
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}

View File

@ -168,9 +168,6 @@ int OxygenClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const K
case LM_ButtonMarginTop:
return 0;
case LM_ExplicitButtonSpacer:
return 3;
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}

View File

@ -135,9 +135,6 @@ int PlastikClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const
case LM_ButtonMarginTop:
return 0;
case LM_ExplicitButtonSpacer:
return 3;
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}

View File

@ -623,9 +623,6 @@ int QuartzClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const K
case LM_ButtonSpacing:
return 1;
case LM_ExplicitButtonSpacer:
return 3;
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}

View File

@ -443,9 +443,6 @@ int RedmondDeco::layoutMetric(LayoutMetric lm, bool respectWindowState, const KC
case LM_ButtonSpacing:
return 0;
case LM_ExplicitButtonSpacer:
return 2;
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}

View File

@ -110,9 +110,6 @@ int WebClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCom
case LM_ButtonSpacing:
return 0;
case LM_ExplicitButtonSpacer:
return 0;
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}

View File

@ -91,7 +91,7 @@ bool KCommonDecoration::decorationBehaviour(DecorationBehaviour behaviour) const
return false;
}
int KCommonDecoration::layoutMetric(LayoutMetric lm, bool, const KCommonDecorationButton *) const
int KCommonDecoration::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *button) const
{
switch (lm) {
case LM_BorderLeft:
@ -118,7 +118,7 @@ int KCommonDecoration::layoutMetric(LayoutMetric lm, bool, const KCommonDecorati
return 0;
case LM_ExplicitButtonSpacer:
return 5;
return layoutMetric(LM_ButtonWidth, respectWindowState, button )/2; // half button width by default
default:
return 0;