summaryrefslogtreecommitdiffstats
path: root/kicker
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-17 17:22:17 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-17 17:22:17 -0500
commit6342dc39907a647a0fd9f84b3ba143cef4792877 (patch)
tree237c804f8ec6fa033d62d10a1851effbfeb09646 /kicker
parentdbe6ecbb725216ed78c2c7170233762956338542 (diff)
downloadtdebase-6342dc39907a647a0fd9f84b3ba143cef4792877.tar.gz
tdebase-6342dc39907a647a0fd9f84b3ba143cef4792877.zip
Fix a number of issues related to the media kioslave
Diffstat (limited to 'kicker')
-rw-r--r--kicker/kicker/buttons/kbutton.cpp10
-rw-r--r--kicker/kicker/core/container_button.cpp13
-rw-r--r--kicker/libkicker/kickerSettings.kcfg5
3 files changed, 20 insertions, 8 deletions
diff --git a/kicker/kicker/buttons/kbutton.cpp b/kicker/kicker/buttons/kbutton.cpp
index 88b664059..6e934eb4f 100644
--- a/kicker/kicker/buttons/kbutton.cpp
+++ b/kicker/kicker/buttons/kbutton.cpp
@@ -56,8 +56,8 @@ KButton::KButton( TQWidget* parent )
setButtonText(KickerSettings::kMenuText());
setFont(KickerSettings::buttonFont());
setTextColor(KickerSettings::buttonTextColor());
- setMaximumHeight(30);
- setMaximumWidth(widthForHeight(30));
+ setMaximumHeight(KickerSettings::maximumTDEMenuButtonHeight());
+ setMaximumWidth(widthForHeight(KickerSettings::maximumTDEMenuButtonHeight()));
setCenterButtonInContainer(false);
}
}
@@ -70,7 +70,7 @@ KButton::~KButton()
int KButton::widthForHeight(int height) const
{
if (KickerSettings::showKMenuText()) {
- return PanelPopupButton::widthForHeight(30);
+ return PanelPopupButton::widthForHeight((height>KickerSettings::maximumTDEMenuButtonHeight())?KickerSettings::maximumTDEMenuButtonHeight():height);
}
else {
return PanelPopupButton::widthForHeight(height);
@@ -80,7 +80,9 @@ int KButton::widthForHeight(int height) const
int KButton::heightForWidth(int width) const
{
if (KickerSettings::showKMenuText()) {
- return 30;
+ int recommendation = PanelPopupButton::heightForWidth(width);
+ if (recommendation > KickerSettings::maximumTDEMenuButtonHeight()) recommendation = KickerSettings::maximumTDEMenuButtonHeight();
+ return recommendation;
}
else {
return PanelPopupButton::heightForWidth(width);
diff --git a/kicker/kicker/core/container_button.cpp b/kicker/kicker/core/container_button.cpp
index fa3814bfb..a73d08abf 100644
--- a/kicker/kicker/core/container_button.cpp
+++ b/kicker/kicker/core/container_button.cpp
@@ -150,11 +150,16 @@ void ButtonContainer::embedButton(PanelButton* b)
_button = b;
_button->installEventFilter(this);
- if (b->centerButtonInContainer()) {
- TQVBoxLayout* vbox = new TQVBoxLayout(this);
- vbox->addWidget(_button);
- _layout = vbox;
+ TQVBoxLayout* vbox = new TQVBoxLayout(this);
+ if (!b->centerButtonInContainer()) {
+ b->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
+ vbox->addWidget(_button, 1);
+ if (!b->centerButtonInContainer()) {
+ TQSpacerItem* spacer = new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+ vbox->addItem(spacer);
+ }
+ _layout = vbox;
connect(_button, TQT_SIGNAL(requestSave()), TQT_SIGNAL(requestSave()));
connect(_button, TQT_SIGNAL(hideme(bool)), TQT_SLOT(hideRequested(bool)));
diff --git a/kicker/libkicker/kickerSettings.kcfg b/kicker/libkicker/kickerSettings.kcfg
index 9d3b90f58..c1c4f19a5 100644
--- a/kicker/libkicker/kickerSettings.kcfg
+++ b/kicker/libkicker/kickerSettings.kcfg
@@ -434,6 +434,11 @@
<default>3</default>
</entry>
+<entry name="MaximumTDEMenuButtonHeight" key="MaximumTDEMenuButtonHeight" type="Int" >
+ <label>The maximum height of the TDE Menu button in pixels</label>
+ <default>30</default>
+ </entry>
+
<entry name="RemoveButtonsWhenBroken" type="Bool" >
<label>Buttons that represent KServices (applications, primarily) watch for the removal of the service and delete themselves when this happens. This setting turns this off.</label>
<default>true</default>