lipido / kargos

KDE Plasma port of GNOME Argos and OSX BitBar
GNU General Public License v3.0
126 stars 14 forks source link

Request: adding fixed-width mode for kargos on the panel #8

Open trmdi opened 7 years ago

trmdi commented 7 years ago

Like the title says, could you add this mode to kargos? If the label is too long, you could truncate it in order to fit the fixed width. And the tooltip would support to display the full text, with a picture, for example...

// Thank you for good listening. Have a nice weekend!

lipido commented 7 years ago

The truncate is, in fact, a BitBar feature (length attribute) I have not implemented yet. Maybe this could be the solution.

PD: Adding Tooltips to this version of QML is a little tricky. But I could try...

trmdi commented 7 years ago

Well, this is a good reference for you, I think: https://github.com/cute-jumper/plasma-rss-indicator // Btw, kde is now switching from plasmapkg to kpackagetool5

lipido commented 7 years ago

Added in cbc60680a5ff0db64430c598a77ecef963742ce7

This establishes a fixed text width in pixels, which is the variable part (the icons and the buttons are additional width. If icons of rotating items have different widths, the user should use imageWidth and iconWidth to ensure the panel do not changes its total width while items are rotating).

When the BitBar length attribute be implemented, this feature will be also necessary, since length is in characters, not in pixels, so in non-monospaced fonts the plasmoid could be "moving" a little while rotating texts.

trmdi commented 7 years ago

For example when I use the RSS example with a fixed width for kargos on the panel, in every 5s delay for each rotating item, the text is truncated, could you make it scroll from right to left? So I can read the whole text without having to open the dropdown menu to find it.

Similar to this effect: http://jsfiddle.net/vivekw/pHNpk/2/ Very easy for quickly reading.