Version: HEAD (using KDE KDE 3.4.0) Installed from: Compiled From Sources OS: Linux PROBLEM: The margin and padding properties of the rectangle object have no effect on the displayed object. STEPS TO REPRODUCE: Create a rectangle object Enter layout mode and double click on the object to launch the Edit Box dialog Change the margin and/or padding property values and hit OK RESULTS: The rectangle object remains unchanged EXPECTED RESULTS: The rectangle object changes in some way
Margin and padding are not implemented in most cases, correct. Furthermore the implementations in various places are broken or inconsistent.
Can we disable those options in the box dialog until they actually do something?
I think we should remove the options from the default dialog. If a view object supports the features, they should add them themselves. These features will never have meaning for boxes, and pictures don't currently support these ideas (though they should). The following diff removes the fields from the default dialog, and adds a FIXME to pictures for future reference. There are no added strings. Index: kstborderedviewobject.cpp =================================================================== --- kstborderedviewobject.cpp (revision 502591) +++ kstborderedviewobject.cpp (working copy) @@ -191,16 +191,6 @@ map.insert(QString("_kst_widgetType"), QString("QSpinBox")); map.insert(QString("_kst_label"), i18n("Border width")); map.insert(QString("minValue"), 0); - } else if (propertyName == "padding") { - map.insert(QString("_kst_widgetType"), QString("QSpinBox")); - map.insert(QString("_kst_label"), i18n("Padding")); - map.insert(QString("minValue"), 0); - map.insert(QString("enabled"), false); - } else if (propertyName == "margin") { - map.insert(QString("_kst_widgetType"), QString("QSpinBox")); - map.insert(QString("_kst_label"), i18n("Margin")); - map.insert(QString("minValue"), 0); - map.insert(QString("enabled"), false); } return map; } Index: kstviewpicture.cpp =================================================================== --- kstviewpicture.cpp (revision 502591) +++ kstviewpicture.cpp (working copy) @@ -249,6 +249,16 @@ map.insert(QString("_kst_widgetType"), QString("QSpinBox")); map.insert(QString("_kst_label"), i18n("Refresh timer")); } + // FIXME: uncomment once these are supported. + /* else if (propertyName == "padding") { + map.insert(QString("_kst_widgetType"), QString("QSpinBox")); + map.insert(QString("_kst_label"), i18n("Padding")); + map.insert(QString("minValue"), 0); +} else if (propertyName == "margin") { + map.insert(QString("_kst_widgetType"), QString("QSpinBox")); + map.insert(QString("_kst_label"), i18n("Margin")); + map.insert(QString("minValue"), 0); +}*/ return map; }
Should be fixed for 1.2 release
Ok, patch reviewed=me. On Thursday 26 January 2006 12:58, netterfield@astro.utoronto.ca wrote: [bugs.kde.org quoted mail]
SVN commit 502689 by netterfield: BUG: 118675 Remove the unused parameters from the dialog. M +0 -10 kstborderedviewobject.cpp M +10 -0 kstviewpicture.cpp --- trunk/extragear/graphics/kst/kst/kstborderedviewobject.cpp #502688:502689 @@ -191,16 +191,6 @@ map.insert(QString("_kst_widgetType"), QString("QSpinBox")); map.insert(QString("_kst_label"), i18n("Border width")); map.insert(QString("minValue"), 0); - } else if (propertyName == "padding") { - map.insert(QString("_kst_widgetType"), QString("QSpinBox")); - map.insert(QString("_kst_label"), i18n("Padding")); - map.insert(QString("minValue"), 0); - map.insert(QString("enabled"), false); - } else if (propertyName == "margin") { - map.insert(QString("_kst_widgetType"), QString("QSpinBox")); - map.insert(QString("_kst_label"), i18n("Margin")); - map.insert(QString("minValue"), 0); - map.insert(QString("enabled"), false); } return map; } --- trunk/extragear/graphics/kst/kst/kstviewpicture.cpp #502688:502689 @@ -249,6 +249,16 @@ map.insert(QString("_kst_widgetType"), QString("QSpinBox")); map.insert(QString("_kst_label"), i18n("Refresh timer")); } + // FIXME: uncomment once these are supported. + /* else if (propertyName == "padding") { + map.insert(QString("_kst_widgetType"), QString("QSpinBox")); + map.insert(QString("_kst_label"), i18n("Padding")); + map.insert(QString("minValue"), 0); +} else if (propertyName == "margin") { + map.insert(QString("_kst_widgetType"), QString("QSpinBox")); + map.insert(QString("_kst_label"), i18n("Margin")); + map.insert(QString("minValue"), 0); +}*/ return map; }