D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2019-11-24 Thread Christoph Feck
cfeck resigned from this revision. cfeck added a comment. This revision is now accepted and ready to land. Yes, I would prefer the check condition. Feel free to commandeer; it looks like the original author didn't find time to further investigate. REVISION DETAIL

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2019-11-23 Thread David Faure
dfaure added a comment. @cfeck Can you review this again? I guess this could be improved with `if (text == d->fullText) return;` but the patch is already an improvement as is. REVISION DETAIL https://phabricator.kde.org/D7010 To: brauch, cfeck, dfaure Cc: rkflx, dfaure, dhaumann,

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2018-09-05 Thread Dominik Haumann
dhaumann added a subscriber: rkflx. dhaumann added a comment. @dfaure: writing "Henrik" when he already unsubscribeb will never reach him. Ping @rkflx REVISION DETAIL https://phabricator.kde.org/D7010 To: brauch, cfeck, dfaure Cc: rkflx, dfaure, dhaumann, aacid, #frameworks, michaelh,

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2018-09-05 Thread Sven Brauch
brauch added a comment. For the record, I tried writing a test for this but didn't succeed and eventually put it aside, although the difference is easily visible in a test application. There must be a reason why the naive test case behaves differently from an interactive application ... I

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2018-08-25 Thread David Faure
dfaure accepted this revision. dfaure added a comment. Makes sense to me, actually. A unittest is difficult to write but an interactive test program would be an easy way to see the difference that this makes. Henrik: everything OK? I see you unsubscribed from a number of phabricator

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2018-08-24 Thread Henrik Fehlauer
rkflx resigned from this revision. REVISION DETAIL https://phabricator.kde.org/D7010 To: brauch, cfeck Cc: dhaumann, aacid, #frameworks, michaelh, ngraham, bruns

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-08-20 Thread Henrik Fehlauer
rkflx added a comment. Probably related to https://phabricator.kde.org/R32:3e530e780b596e9505b66e1ae7b1044d335adb07 (I guess Phabricator only adds "mentions" for shortlinks like Dxxx, but not full URLs?). REVISION DETAIL https://phabricator.kde.org/D7010 To: brauch, cfeck, rkflx Cc:

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-08-10 Thread Henrik F .
rkflx added a comment. Are you sure you are calling updateGeometry() in the right place and that there are no other places where it should be called? Having a test case clearly demonstrating the connection between the docs quote and your last sentence of the summary would be reassuring not

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-08-10 Thread Sven Brauch
brauch added a comment. I can write a test if you think this helps. I think reading the docs it is quite clear we must call updateGeometry() here: our sizeHint() changes when changing the text. REVISION DETAIL https://phabricator.kde.org/D7010 To: brauch, cfeck, rkflx Cc: dhaumann,

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-08-10 Thread Henrik F .
rkflx added a comment. Looking at the Qt docs, we see: > Call QWidget::updateGeometry() whenever the size hint, minimum size hint or size policy changes. This will cause a layout recalculation. To decide whether this is also meaningful for a squeezable label, a testcase would be

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-08-06 Thread Dominik Haumann
dhaumann added a reviewer: rkflx. dhaumann added a comment. Add Henrik, since he has several patches in the pipe as well... REVISION DETAIL https://phabricator.kde.org/D7010 To: brauch, cfeck, rkflx Cc: dhaumann, aacid, #frameworks

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-08-03 Thread Sven Brauch
brauch updated this revision to Diff 17638. brauch added a comment. Right. Better call it here. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7010?vs=17411=17638 REVISION DETAIL https://phabricator.kde.org/D7010 AFFECTED FILES src/ksqueezedtextlabel.cpp To: brauch, cfeck Cc:

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-08-03 Thread Christoph Feck
cfeck requested changes to this revision. cfeck added a comment. This revision now requires changes to proceed. The title says "when text changes", but you call it even if the text does not change. Note that squeezeTextToLabel() is called from many places, including resizeEvent(), so avoid

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-07-30 Thread Sven Brauch
brauch added a comment. With enough dedication, probably yes ... REPOSITORY R236 KWidgetsAddons REVISION DETAIL https://phabricator.kde.org/D7010 To: brauch, cfeck Cc: aacid, #frameworks

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-07-30 Thread Albert Astals Cid
aacid added a comment. do we have autotests for this? Can they be added? REPOSITORY R236 KWidgetsAddons REVISION DETAIL https://phabricator.kde.org/D7010 To: brauch, cfeck Cc: aacid, #frameworks

D7010: KSqueezedTextLabel: call updateGeometry() when text changes

2017-07-30 Thread Sven Brauch
brauch created this revision. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. REVISION SUMMARY By changing the full text, the sizeHint() of the widget changes. If the