The Twitter Microblogging widget is a really useful tiny little utility, unfortunately until now it had severe appearance problems, especially when resizing the thing it did happen that contents could overflow from the applet boundaries.
This was partly due to some problems Qt 4.4 had with QGraphicsLayouts partly to our workarounds to those problems.
In Plasma we’re the childs with the slingshot that terribly enjoy to break stuff, the Qt components that Plasma uses, the QGraphicsView related stuff is a part significantly younger than the other parts of Qt, and we are putting it on a really tough stress test and this, even tough painful at start, it makes the framework mature at a really fast pace.
Now, i’m really impressed with the quantity of bugfixes present in Qt 4.5, so i decided to give the microblogging plasmoid another little quantity of love, and this is the result:
So now the height of individual posts grows and shrinks depending on the text layout inside them and when the size of contents is bigger than the size of the widget it shows (or hides) scrollbars as needed (it’s also kinda touchscreen friendly since it can scroll by dragging the contents themselves). So now works more as it is expected to from day one, that wouldn’t be breaking news per-se, but it demonstrates that the stuff we were uber-early adopters it’s really coming together and show what its real potential was.
What’s more important is that not only the microblogging widget works better now, but it’s also easy to write a new widget like that, since the process produced two new widgets in libplasma (widgets not in the sense of plasmoids, yeah i know it’s confusing:): TextBrowser to be used every time you have to display formatted text simple enough to not require Webkit. The other one is ScrollWidget, where you simply slap another widget in it ant it will automatically decide when cut away a part of the contents and when to show the scrollbars or not.
As I was showing here now Plasma in trunk can also play video/audio files, so what will be there in KDE 4.3? Basically two components:
The first is a media player widget (or applet, or whatever…). It will be the basis for a future media center written totally with Plasma technologies (one of the exciting discussions we had at Tokamak2 🙂 as today it’s in playground and plays video files dropped in plasma, can open arbitrary audio/video files, has some usual control buttons and exposes the standard org.mpris D-bus interface used to control media applications, can be controlled for instance from the now playing widget, as shown here.
The most central component is in libplasma right now and instead is well, a media player widget :p
The difference is that it is a widget in the sense of reusable control to be used in the applets/widgets/plasmoids you write (so, wanna for instance make a youtube browser?:), it uses various components of Phonon, like Videowidget, MediaObject and AudioOutput and has a default set of control buttons that do a nice slide in/slide out on mouse over, and the reallt cool thing is that using it from the javascript bindings is ridicolously easy.
This is a complete plasmoid written in javascript in the minboggling amount of 6 lines of code:
layout = new LinearLayout(plasmoid);
video = new VideoWidget();
video.usedControls = DefaultControls;
layout.addItem(video);
video.url = startupArguments[0];
video.play();
All it does in sequence is: make a layout, make a video widget, enable a default set of buttons, add the widget in the layout, load the argument as the video if any (i.e, the file that was dag and dropped on the desktop), and finally, play.
This thing is in kdebase in the tests folder of the javascript based plasmoids.
Now, switching for a moment in hype-machine mode, think about putting together media content distribution, javascript, plasma, browsers and the not really happy state of these things in Linux right now, really far fetched for now and not for the immediate future, but good things can happen 😀
This is a tiny plasmoid hacked on a boring sunday afternoon in about 20 mins, perhaps a too silly name but i think the effect is kinda fun 🙂
It’s an on-screen magnifying glass with the difference from the usual ones that it doesn’t actually grab the screen, but it just views the Plasma canvas (just another view on the scene, that is), that gives some peculiarities, shown in this video:
All the windows are totally transparent to it, so while is useful to view/magnify just what there is on desktop it can give a quick access on it, when you need both your windows and stuff on desktop (think about a non-fullscreen dashboard, and then think about drag and drop between dolphin and folderview even when you have a maximized window :P)
And the more cute thing is due to the vector nature of the QGraphicsView, you see all the proper vector-based elements like the text to be smoothly scaled and still looking like text, not that usual pixelated/blurry mess that kinda hinders the utility of screen magnifiers as accessibility applications.
It’s amazing what it’s possible to do in plasma with a really limited amount of lines of code (here about 100, perhaps 20 or so could even still be saved:)
The thing now lives in playground and is still really rough, so not definitely 4.2 material, but who feels like can give it a try anyways:)
After seeing total coolness like this and this, i of course decided that Plasma couldn’t lag behind that total ratio of awesomeness.
This is an idea from right the begin of Plasma (we always had the MediaCenter formfactor impatiently waiting to be actually used after all:)
At the begin a thing like what I did today was not possible for two reasons: throwing qwidgets on canvas is possible only from Qt 4.4 and before Phonon was not able to render over widgets. In fact the first version of the Amarok video applet had to embed a window in the applet with the video in, so no correct z ordering, no transforms etc.. but now the good plan come together and is possible to render video even on the walls of a wolfenstein 3d maze (hats off to Matthias Kretz) 😀
The cutie in this video is a plasma applet that embeds a video, it uses the X-Plasma-DropMimeTypes directive in its desktop file, so it’s sufficient to drop a video file on the desktop and the applet is automagically created.
This applet that lives in playground is highly experimental: no config options, no audio, no seeking, just bare working.
But it’s just the beginning, for 4.3 there will be a generic widget usable with few lines of code (even scripted of course) and a basic applet. Yeah i know, 4.2 is still far and the 4.3 teasing is started already, we are soo evil :p
Plasma always had this really cute concept of “formfactor”: in brief different areas where plasmoids can reside have different behaviours, for instance a desktop is planar, i.e. the applets can grow anywhere they want.
The panel on the other hand can have a vertical or horizontal form factor, it means the applets in it can grow only in the vertical or horizontal direction, so an applet with a high quantity of content can’t display everything it would want…
In past releases of KDE4 the right behaviour of applets was still not really finished, so some applets like the device notifier were more kind to the panel, displaying the whole device list on the desktop and an icon+popup on the panel, other applets like the twitter applet hmm not soo good 🙂
Now with KDE 4.2 every standard applet distributed with kdewill fully use the form factor concept, so far we have 3 different classes of applets:
Applets that are just the same or with very little differences in different form factors, like simple icons or the taskbar.
Applets that diminishes their information quantity in horizontal or vertical form factors, here are two examples:
when in the panel the now playing applet just displays the control buttons, and the leave note applet switches to an horizontal layout, so it makes enough room for an horizontal panel.
Some other applets, like the device notifier or kickoff wouldn’t mean that much without some of its contents, so in the panel will be an icon+popup and in the desktop the whole plasmoid will be shown. but what about very big panels, so big that the whole plasmoid could fit and a ginormous icon wouldn’t make so much sense?
When the applet knows that it would fit into the panel, the icon goes away and the whole applet content is displayed, and goes back to an icon when the panel is shrinked again.
Now, since Plasma in KDE 4.2 supports also panels not always on top and autohide panels, you could have for instance a thing that looks like a Quake console with plasmoids in it, just like Konsole for terminals 🙂
Just a little thing, but it looked to me it kinda deserved a really short screencast 🙂
Adding applets to the panel with drag and drop in plasma was a bit of a pita, because you had to hit exactly that 4 pixels between an item and the other, so painful that wasn’t really obvious it was possible at all…
so here is how the current trunk behaves 🙂
In other news some days ago something like 7 applets (did i forgot some others?:) were merged for 4.2 release counting what is in the workspace module and in the addons module, so there will be a ton more stuff to play with :).
That’s the reason for the kabooms we are fixing right now, but no fear 🙂
Quick video: this is a proof of concept plasmoid i wrote quite some time ago and then forgotten to talk about 🙂
Is a little tabbar meant to be put in a panel that lists all your desktop activities and lets you switch them in a quick way, as seen in the video it also keeps itself syncronized if something changes, so if you switch with the zoom user interface it switches accordingly, it creates and remove tabs when desktops are created or removed.
The name of the tab is the name of the activity you can set in the desktop wallpaper/theme/etc configuration dialog.
The name it’s just the beginning of the activity concept, in the future the desktops and the applets in it will be aware and will react to their context, like what time is it, is the network attached or not, heck even what is our geographic coordinate…
But that’s another and more exciting story that just a teeeny tab bar :p
Did some work on the code of that little tiny things that lets you move and configure the Plasma applets, the poor ol’applet handles that really needed some visual love(tm) and some speedups, so the result is the following:
It’s started from a Nuno mockup he did quite some time ago, and while the graphics will probably be a lot more refined than they are now (i.e. become closer to the mockup), i think code wise we are definitely here 🙂
First of all the old icons were so-so, partly because we didn’t have the exactly right metaphore partly because they eren’t designed for that kind of background, so now they are Plasma-theme specific, the default is a set of very simple monocrome shapes but more recognizable. In the future these little thingies will be used all across Plasma, so more power to theme creators, yay 🙂
Now the handle also uses a svg background from the plasma theme, it behaves differently (so always in the right way i hope:) for different types and sizes of applets and has a new cute sliding animation that makes the thing to feel more “attached” to the applet itself.
Long time no blog as usual, so let’s do some Plasma Quickies:
I’ve decided to do some love to two configuration dialogs, the wallpaper one and my loved ultrascary panel configuration “Thing”.
A while ago the configuration dialog had some problems.
The monitor preview looked ugly and deformed on widescreens, but most annoying thing it wasn’t possible to chose the desired cropping or scaling method when in slideshow mode, so you had to chose between a single image or a series of horribly distorted images 🙂
now the thing looks like this:
Desktop activity and theme before the wallpaper section, because wallpaper configuration will be just one aspect, even secondary behind the concept of activity (oh and now there is a textbox t give them a name), explayned way better by aaron.
the monitor preview looks always good, not important what weird ratio your actual monitor has 🙂
All the controls are better aligned conforming the HIG and making less visual noise.
The folder list in the slideshow mode grows and shrinks when adding/removing folders, so there is no more a big white empty spot when it’s empty 🙂
Now, my favourite configuration little monster, the panel configuration:
The size handles have little arrows that should be a bit more intuitive what is the min and what is the max and
now the move and resize actions are buttons with a label, so should be more obvious how to do to move it and change the height, while the less frequent actions (or dangerous as in the case of remove panel) are moved in a submenu, so it gives a less crowded look.
And oh, now there is a config ui for the quite recent panel autohide too 🙂 you can chose between normal panel always visible as is now, autohide or a panel not always on top, that can go under other windows.
It still looks a bit ugly but will be given a way more plasmalove(tm) look in the next days, stay tuned 🙂