You are not logged in.

#1 2011-04-24 20:22:21

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

qtpanel - a project to create useful and beautiful panel in Qt

Links

Screenshots
tOGVsdAtOGhvbgtaGtlZw

Features

  • Applications menu, xdg compatible.

  • Taskbar with drag-and-drop rearrange.

  • Notification area (tray).

  • Clock applet.

  • Beautiful look.

  • High-DPI support.

Other notes

  • Configurability is rather limited right now.

  • Very small and hackable codebase.

Last edited by Mad Fish (2013-03-03 17:54:06)

Offline

#2 2011-04-25 07:25:29

ctarwater
Member
Registered: 2009-02-05
Posts: 300

Re: qtpanel - a project to create useful and beautiful panel in Qt

This looks great!  I'm going to try it out later today - question though, is there an integrated system tray?

Regardless, excited to see a QT based panel and look forward to developments (and configurability).

Offline

#3 2011-04-25 08:46:01

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: qtpanel - a project to create useful and beautiful panel in Qt

I've started tray applet implementation, but it wasn't as easy as I've expected. It is in the code (trayapplet.h, trayapplet.cpp), but disabled for now. There are some resizing issues with QX11EmbedContainer, and there are probably visual mismatch issues, because nothing appears in case when window background is set to translucent. If there are people here with knowledge in this area, I would appreciate help.

Offline

#4 2011-04-25 18:44:36

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: qtpanel - a project to create useful and beautiful panel in Qt

Good job. This panel looks beautiful so far. And with Qt, it can become very customizable. Make sure you give some love to those of us who use vertical panels. ;-)

Offline

#5 2011-04-25 19:43:26

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: qtpanel - a project to create useful and beautiful panel in Qt

Support for vertical panels is planned. In fact, panel positioning code is already aware of vertical panels.
My time is quite limited, unfortunately. I need more hands. smile Developers with C++ knowledge are welcome to join.

Offline

#6 2011-04-26 05:05:08

hellnest
Member
From: $ dmesg | grep ATA
Registered: 2010-11-11
Posts: 194
Website

Re: qtpanel - a project to create useful and beautiful panel in Qt

It's really beautiful and promising smile


roll Snapping my own life roll
hmmgithubhmm
coolMyBlogcool

Offline

#7 2011-04-26 07:00:04

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Re: qtpanel - a project to create useful and beautiful panel in Qt

This looks extremely promising, love the speed of menu rendering (fastest menu I've ever seen) and the "glow" mouse-over effects smile However it's still kinda buggy, it starts with some wooden-looking theme and then it becomes black when I first click on it...

Offline

#8 2011-04-26 09:51:49

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: qtpanel - a project to create useful and beautiful panel in Qt

karabaja4 wrote:

This looks extremely promising, love the speed of menu rendering (fastest menu I've ever seen) and the "glow" mouse-over effects smile However it's still kinda buggy, it starts with some wooden-looking theme and then it becomes black when I first click on it...

Can you provide some more details? It's working fine on my two test machines.

Offline

#9 2011-04-26 10:10:52

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

Re: qtpanel - a project to create useful and beautiful panel in Qt

under xmonad panel behavior is very weird. It seems it doesn't represent itself like "panel" to wm
sometimes it looks normal, but sometimes like this:
vOGZlMg

Offline

#10 2011-04-26 10:49:51

hellnest
Member
From: $ dmesg | grep ATA
Registered: 2010-11-11
Posts: 194
Website

Re: qtpanel - a project to create useful and beautiful panel in Qt

There's something you need to modify in PKGBUILD,

you should add "cmake" as makedepends
and use this url for _gitroot:"git://gitorious.org/qtpanel/qtpanel.git"

smile regads


roll Snapping my own life roll
hmmgithubhmm
coolMyBlogcool

Offline

#11 2011-04-26 16:30:40

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: qtpanel - a project to create useful and beautiful panel in Qt

hellnest wrote:

There's something you need to modify in PKGBUILD,

you should add "cmake" as makedepends
and use this url for _gitroot:"git://gitorious.org/qtpanel/qtpanel.git"

smile regads

Done. Thanks.

cf8 wrote:

under xmonad panel behavior is very weird. It seems it doesn't represent itself like "panel" to wm
sometimes it looks normal, but sometimes like this:
http://ompldr.org/vOGZlMg

The only suspicious thing I can find, is that Qt always adds "_NET_WM_WINDOW_TYPE_NORMAL" to _NET_WM_WINDOW_TYPE property. That way, as xprop reports

_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_NORMAL

on qtpanel's window. Maybe xmonad expects it to be only dock. I'm not sure what's the right way to get rid of that "NORMAL" hint, since it's unconditionally added by Qt.
xmonad is actually not complying to NETWM spec, it's probably not a good idea to run qtpanel with it, since things will be most likely broken (the first and obvious thing - there is no _NET_CLIENT_LIST property on root window, and that means no taskbar).
P.S. I'm not sure how taskbar worked in your case. At least in default config, xmonad doesn't set _NET_CLIENT_LIST property.

Last edited by Mad Fish (2011-04-26 16:38:16)

Offline

#12 2011-04-26 18:20:33

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: qtpanel - a project to create useful and beautiful panel in Qt

ΝICE job !!

Could you add an option (right click?) to resize the panel ?

Offline

#13 2011-04-26 18:36:28

Sikon
Member
Registered: 2011-04-26
Posts: 7

Re: qtpanel - a project to create useful and beautiful panel in Qt

This project looks very promising wink I have just tried to run it, but unfortunately it does not start:

[sikon@Zeus qtpanel]$ ./qtpanel 
Segmentation fault
[sikon@Zeus qtpanel]$

vlagrind tells there is a problem with the getWindowPropertyWindow method in X11Support class:

==4621== Invalid read of size 8
==4621==    at 0x4178B6: X11Support::getWindowPropertyWindow(unsigned long, QString const&) (in /home/sikon/Desktop/qtpanel/qtpanel)
==4621==    by 0x4249E5: DockApplet::updateActiveWindow() (in /home/sikon/Desktop/qtpanel/qtpanel)
==4621==    by 0x42442F: DockApplet::init() (in /home/sikon/Desktop/qtpanel/qtpanel)
==4621==    by 0x41A541: PanelWindow::init() (in /home/sikon/Desktop/qtpanel/qtpanel)
==4621==    by 0x4196AD: PanelApplication::PanelApplication(int&, char**) (in /home/sikon/Desktop/qtpanel/qtpanel)
==4621==    by 0x41952A: main (in /home/sikon/Desktop/qtpanel/qtpanel)
==4621==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

As you can see the method is called by the updateActiveWindow method in DockAplet class. After removing the call of getWindowPropertyWindow (line 345, dockapplet.cpp) the program starts without any problems. I am not an C++ expert* but it seems you do not create an instance of X11Support, at least I could not find any.

Compiled on Arch Linux x86_64, latest source code from git repo (commit f5b54e1df6a2e4e5bf60e346c6d8c8b2b895b9ae)
* from time to time I try to learn it…

Last edited by Sikon (2011-04-26 18:45:42)

Offline

#14 2011-04-26 18:45:02

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: qtpanel - a project to create useful and beautiful panel in Qt

flamelab wrote:

ΝICE job !!

Could you add an option (right click?) to resize the panel ?

It will be even better, as soon as I get another time chunk to spend on it. smile
Before I start adding options, I need to decide, what the configuration system should be. Two alternatives are ini files and dconf. dconf has some cool features like settings inheritance (system config, user config), settings change notifications, quick binary format, and it's also used by new GNOME, which will allow to integrate better with GNOME environment (for example, by reusing some common settings like icon theme, fonts, etc.). But there is no dconf bindings for Qt, and binary format for configs is somewhat scary despite the fact it's fast. I would like to hear some opinions on this.

Last edited by Mad Fish (2011-04-26 18:58:26)

Offline

#15 2011-04-26 18:57:13

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: qtpanel - a project to create useful and beautiful panel in Qt

Sikon wrote:

As you can see the method is called by the updateActiveWindow method in DockAplet class. After removing the call of getWindowPropertyWindow (line 345, dockapplet.cpp) the program starts without any problems. I am not an C++ expert* but it seems you do not create an instance of X11Support, at least I could not find any.

X11Support object instance is created in panelapplication.cpp, line 31.
I fixed this crash in git. You got this, because there was no _NET_ACTIVE_WINDOW property on root window, which means your window manager is not NETWM compliant. That property specifies what window currently has focus.
But of course, no excuse for crashes. smile

Offline

#16 2011-04-26 20:51:24

Kosava
Member
From: Serbia
Registered: 2008-08-19
Posts: 127

Re: qtpanel - a project to create useful and beautiful panel in Qt

Wow this look promising i have one suggestion with scroll button when move up to show window and when scroll down to minimize window...

Offline

#17 2011-04-26 21:01:04

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: qtpanel - a project to create useful and beautiful panel in Qt

Mad Fish wrote:

The only suspicious thing I can find, is that Qt always adds "_NET_WM_WINDOW_TYPE_NORMAL" to _NET_WM_WINDOW_TYPE property. That way, as xprop reports

_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_NORMAL

on qtpanel's window. Maybe xmonad expects it to be only dock. I'm not sure what's the right way to get rid of that "NORMAL" hint, since it's unconditionally added by Qt.

You should be okay. The EWMH spec says that the first type should be considered primary.

Mad Fish wrote:

xmonad is actually not complying to NETWM spec, it's probably not a good idea to run qtpanel with it, since things will be most likely broken (the first and obvious thing - there is no _NET_CLIENT_LIST property on root window, and that means no taskbar).
P.S. I'm not sure how taskbar worked in your case. At least in default config, xmonad doesn't set _NET_CLIENT_LIST property.

Indeed, XMonad does not comply with EWMH out of the box. You need to add things to your config to get XMonad to cooperate.

In either case, XMonad should still be positioning your panel correctly. Have you set struts?

I haven't tried your panel yet as I don't use one, but I do use XMonad. When I get some free time, I'll see what I can do for other XMonad users out there.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#18 2011-04-26 21:22:05

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: qtpanel - a project to create useful and beautiful panel in Qt

Kosava wrote:

Wow this look promising i have one suggestion with scroll button when move up to show window and when scroll down to minimize window...

At least one another way of using mouse wheel exists - to switch between windows, when scrolling on top of taskbar. This will be configurable, I just need to get configuration system in place first.

BurntSushi wrote:

In either case, XMonad should still be positioning your panel correctly. Have you set struts?
I haven't tried your panel yet as I don't use one, but I do use XMonad. When I get some free time, I'll see what I can do for other XMonad users out there.

Struts are set. It is working correctly at least in Xfce WM, KWin and Openbox. I want my panel to work well with as many configurations possible, but I don't have that much time to dig into every possible WM, so I would definitely appreciate your help with XMonad.

P.S. (XMonad) Over 750 megabytes of dependencies for a minimal WM. Oh my...

Offline

#19 2011-04-26 23:16:05

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: qtpanel - a project to create useful and beautiful panel in Qt

Mad Fish wrote:

P.S. (XMonad) Over 750 megabytes of dependencies for a minimal WM. Oh my...

The WM is quite minimal, GHC is not. :-)

It's the price one pays for static linking.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#20 2011-04-26 23:59:53

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: qtpanel - a project to create useful and beautiful panel in Qt

Hello,

Imho, using Qsettings to manage panel settings / prefs should be quick and easy.

I made this (very quick and dirty):

panelsettings.h

#ifndef PANELSETTINGS_H
#define PANELSETTINGS_H

#include <QSettings>

class panelsettings
{
public:
    panelsettings();
    void loadSettings();
    QString get(QString settingName);

private:
    QSettings *m_settings;

};

#endif // PANELSETTINGS_H

panelsettings.cpp

#include "panelsettings.h"


panelsettings::panelsettings() {
}

void panelsettings::loadSettings() {
    m_settings = new QSettings("foo", "qtpanel");
    //m_settings->setValue("panel/height", 32);
    //m_settings->setValue("panel/icontheme", "Faenza-Dark");
    m_settings->sync();
}

QString panelsettings::get(QString settingName) {
    return m_settings->value(settingName, "").toString();
}

Addition in panelapplication.h

private:
...
panelsettings* m_panelsettings;

Addition in panelapplication.cpp (in constructor)

m_panelsettings = new panelsettings();
m_panelsettings->loadSettings();

...

QIcon::setThemeName(m_panelsettings->get("panel/icontheme"));

If you want, I can take some time to do a better job. :-)
Feel free to use it...

Regards

Last edited by Shaika-Dzari (2011-04-27 00:32:08)

Offline

#21 2011-04-27 06:06:46

Sikon
Member
Registered: 2011-04-26
Posts: 7

Re: qtpanel - a project to create useful and beautiful panel in Qt

Mad Fish wrote:


Before I start adding options, I need to decide, what the configuration system should be. Two alternatives are ini files and dconf. dconf has some cool features like settings inheritance (system config, user config), settings change notifications, quick binary format, and it's also used by new GNOME, which will allow to integrate better with GNOME environment (for example, by reusing some common settings like icon theme, fonts, etc.). But there is no dconf bindings for Qt, and binary format for configs is somewhat scary despite the fact it's fast. I would like to hear some opinions on this.

In my opinion you should really avoid using things like dconf or any other Desktop-Environment specific libraries. Of course they offer all the cool stuff you mentioned, but why not using something easy editable (by a human wink) and more portable? As Shaika-Dzari noted, Qt even offers a very easy way to read and write settings files.

Last edited by Sikon (2011-04-27 06:32:58)

Offline

#22 2011-04-27 06:48:40

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

Re: qtpanel - a project to create useful and beautiful panel in Qt

btw xfce4-panel seems work correct on my xmonad setup:
vOGZ3MQ

and i have:

import XMonad.Hooks.EwmhDesktops

in my xmonad.hs file

Also i tried qtpanel on openbox: placement is correct there, but it always stays at one workspace. Very weird.

Offline

#23 2011-04-27 07:28:37

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: qtpanel - a project to create useful and beautiful panel in Qt

Sikon wrote:

In my opinion you should really avoid using things like dconf or any other Desktop-Environment specific libraries. Of course they offer all the cool stuff you mentioned, but why not using something easy editable (by a human wink) and more portable? As Shaika-Dzari noted, Qt even offers a very easy way to read and write settings files.

dconf isn't really desktop specific. It only needs dbus and glib, and is designed to be DE-neutral (unlike gconf, which was not).
Also, I need to store hierarchical configuration, like this:

Global panel settings
* Panel 1
** Appmenu settings
** Dock settings
*** Pinned launcher 1
*** Pinned launcher 2
*** Pinned launcher 3
** Clock settings
* Panel 2
** Applet 1 on panel 2
** Applet 2 on panel 2
...

I don't think there is a nice way to put this in .ini file (which is what QSettings provide).

Offline

#24 2011-04-27 17:02:35

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: qtpanel - a project to create useful and beautiful panel in Qt

You can use the concept of groups in QSettings to realize this.
The file will be flat but QSettings provides enought abstraction to create your structure.

A flat file is easy to edit and to read smile

Offline

#25 2011-04-27 19:16:22

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: qtpanel - a project to create useful and beautiful panel in Qt

New feature done: drag and drop rearranging of taskbar items (feels like rearranging tabs in Chromium).

Offline

Board footer

Powered by FluxBB