[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Mon Sep 19 03:12:43 CEST 2005
SVN commit 461893 by staikos:
Make labels empty by default. No-one wants a label that says "Text". Also
disable auto-defaulting of properties. it's confusing and annoying in my
opinion, but if the feature is demanded, we can come up with a better solution
M +9 -0 ksteditviewobjectdialog_i.cpp
M +2 -4 kstgfxtextmousehandler.cpp
M +1 -1 kstviewlabel.cpp
--- trunk/extragear/graphics/kst/kst/ksteditviewobjectdialog_i.cpp #461892:461893
@@ -260,10 +260,19 @@
// get the widget's property and set it on the viewObject
_viewObject->setProperty(propertyName.latin1(), (*iter)->property(widgetPropertyName.latin1()));
}
+#if 0
+ // Removed by George. This is very strange. Some dialogs have 10+
+ // properties, and when I change 8 of them, the next "new" object of the
+ // same type has all of these modified on me. I have to go through and
+ // change them all back to what they were before. I think this is too
+ // confusing and annoying. We could add a sticky flag or something like
+ // that if this feature is really demanded.
+
// and then save this viewObject's properties as the default
if (_top) {
_top->saveDefaults(_viewObject);
}
+#endif
}
close();
}
--- trunk/extragear/graphics/kst/kst/kstgfxtextmousehandler.cpp #461892:461893
@@ -27,7 +27,7 @@
: KstGfxMouseHandler(top) {
// initial default settings before any sticky settings
- KstViewLabelPtr defaultLabel = new KstViewLabel("Text");
+ KstViewLabelPtr defaultLabel = new KstViewLabel(QString::null);
defaultLabel->setAutoResize(true);
defaultLabel->setForegroundColor(Qt::black);
defaultLabel->setBackgroundColor(Qt::white);
@@ -37,12 +37,10 @@
KstGfxTextMouseHandler::~KstGfxTextMouseHandler() {
-
}
void KstGfxTextMouseHandler::pressMove(const QPoint& pos, bool shift) {
-
if (_cancelled || !_mouseDown) {
return;
}
@@ -77,7 +75,7 @@
// once released, create a new text object and popup the edit dialog
if (!_cancelled && _mouseOrigin != pos) {
- KstViewLabelPtr label = new KstViewLabel("Text");
+ KstViewLabelPtr label = new KstViewLabel(QString::null);
copyDefaults(KstViewObjectPtr(label));
_top->appendChild(KstViewObjectPtr(label));
label->move(_prevBand.topLeft());
--- trunk/extragear/graphics/kst/kst/kstviewlabel.cpp #461892:461893
@@ -76,7 +76,7 @@
_type = "Label";
_dataPrecision = 8;
_autoResize = false; // avoid madness
- _txt = "Text";
+ _txt = "";
_interpret = true;
_rotation = 0.0;
_justify = 0L;
More information about the Kst
mailing list