diff --git a/clients/kde2/kde2.cpp b/clients/kde2/kde2.cpp index 105a883463..975d6d0724 100644 --- a/clients/kde2/kde2.cpp +++ b/clients/kde2/kde2.cpp @@ -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); } diff --git a/clients/laptop/laptopclient.cpp b/clients/laptop/laptopclient.cpp index d8e444d789..8cdd104c23 100644 --- a/clients/laptop/laptopclient.cpp +++ b/clients/laptop/laptopclient.cpp @@ -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); } diff --git a/clients/modernsystem/modernsys.cpp b/clients/modernsystem/modernsys.cpp index e27f3680a6..7b3e3b0a19 100644 --- a/clients/modernsystem/modernsys.cpp +++ b/clients/modernsystem/modernsys.cpp @@ -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); } diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 61d93ff34c..3c02c2af3b 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -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); } diff --git a/clients/plastik/plastikclient.cpp b/clients/plastik/plastikclient.cpp index 50d82225ae..47299b85e8 100644 --- a/clients/plastik/plastikclient.cpp +++ b/clients/plastik/plastikclient.cpp @@ -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); } diff --git a/clients/quartz/quartz.cpp b/clients/quartz/quartz.cpp index 5a734ec3a1..e03870cd8d 100644 --- a/clients/quartz/quartz.cpp +++ b/clients/quartz/quartz.cpp @@ -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); } diff --git a/clients/redmond/redmond.cpp b/clients/redmond/redmond.cpp index 3442004b6b..c0904dd17d 100644 --- a/clients/redmond/redmond.cpp +++ b/clients/redmond/redmond.cpp @@ -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); } diff --git a/clients/web/Web.cpp b/clients/web/Web.cpp index fec394c859..82583abd1d 100644 --- a/clients/web/Web.cpp +++ b/clients/web/Web.cpp @@ -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); } diff --git a/lib/kcommondecoration.cpp b/lib/kcommondecoration.cpp index 635f6f0a36..2070fa9a30 100644 --- a/lib/kcommondecoration.cpp +++ b/lib/kcommondecoration.cpp @@ -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;