Closed smitgd closed 8 years ago
This allows there user to customize via General configuration the size of the pop-up widget from the panel (with no effect on desktop installed widget). For me, on several computers I used these setting to avoid cut-off text at the edges: Fedora 23 laptop: 6/3 (width/height) Fedora 23 desktop 6/3 Arch laptop (on old macbook air): 7/3 Debian testing desktop: 0/0 (only this one didn't cut off any text).
I guess the alternative is to just increase the hardcoded the Layout.minimumWidth/Height in weather.qml but this pull req. seems a bit more general but probably a bit "hackish".
I would personally prefer increase this size a little bit. The setting needs restart plasma (and what if the size is still wrong?). If you wish, you should file a bug on KDE website and ask for this feature.
Re-starting plasma via log-off/log-on is fairly fast and would only take maybe a few cycles to adjust the pop-up to the appropriate size. I doubt if the KDE guys would consider "no resize on panel pop-up" much of a bug since they must have decided a while back that nobody needed it. It seems like there should be some way for the plasmoid content to cause the box to automatically adjust to the needed size so nothing is cut off, but I can't find anything that causes that in the documentation. Anyhow, next pull request is just a hardcoded fix to make the default size of the box some bigger.
Height and width can now be adjusted over the default layout dimensions to fix text that is possibly cut off at edges since the pop-up widget has no resize handle (unlike when widget installed on desktop). This only affects the widget when installed to panel and not the desktop. Note also that the widget must be restarted to take effect so the typical user must log-out/in or reboot after changing the dimensions adjustments. Final note: When adjustment values are 0, implicitHeight/Width remains undefined. This causes default adjustments 0 to cause no change from before this commit since some monitors don't require an adjustment because they don't exhibit edge cut off. Backward compatibility is preserved.