Bug 118675 - Bordered view object properties have no effect
Summary: Bordered view object properties have no effect
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: VHI normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-20 01:04 UTC by Andrew Walker
Modified: 2006-01-27 00:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2005-12-20 01:04:37 UTC
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
Comment 1 George Staikos 2005-12-20 01:51:02 UTC
Margin and padding are not implemented in most cases, correct.  Furthermore the implementations in various places are broken or inconsistent.
Comment 2 Netterfield 2005-12-20 04:42:22 UTC
Can we disable those options in the box dialog until they actually do 
something?
Comment 3 Netterfield 2006-01-26 18:58:48 UTC
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;
 }
Comment 4 Andrew Walker 2006-01-26 19:41:30 UTC
Should be fixed for 1.2 release
Comment 5 George Staikos 2006-01-26 19:58:20 UTC
Ok, patch reviewed=me.

On Thursday 26 January 2006 12:58, netterfield@astro.utoronto.ca wrote:
[bugs.kde.org quoted mail]
Comment 6 Netterfield 2006-01-27 00:23:23 UTC
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;
 }