fluid
fluid copied to clipboard
Headerbars (integrated app bar and window decorations)
https://material.google.com/layout/structure.html#structure-system-bars
Hi, if integrated app bar and window decorations, should we remove windows manager(like openbox,etc) in Qt quick window component, and extend a sub qml window, implement our own "move-window, change-window-size) functions? @iBeliever @plfiorini
just like what @iBeliever did in qml-material
I mean WindowFlags like Qt::CustomizeWindowHint, Qt::FramelessWindowHint, etc(Can't remeber clearly)
@SunRain On the qmlOS desktop we can handle that from the platform theme plugin with a Wayland protocol that would tell the compositor weather it should decorate the window or whether the window does it by itself. On other desktops we should expect that the window manager will decorate the window hence the headerbar somehow should turn into a normal toolbar.
Sorry, don't know about wayland related things, you mean this would handled by greenisland(or where is the platform theme plugin) ? @plfiorini
The workspace/platformtheme part in https://github.com/qmlos/workspace ?
@SunRain the platform theme plugin in the workspace repository (https://github.com/qmlos/workspace) could set an env variable to disable Qt client side dialogs when it detects the application wants to decorate itself using the headerbar. The headerbar also need to communicate back to the application to move the window when dragging the bar.
@SunRain we then need to set a window property on windows that use the header bar so that the compositor knows which windows decorate themselves and which one needs a server-side decoration
Hi, is it possbile to only customize the Control.ToolBar to implement this, like this sample http://paste.ubuntu.com/23128509/ I only set window flag to Qt.FramelessWindowHint, and handle mouse event in it. The problem is I need to add app icon to system(OS) task manger bar when app hide, and show app when clicking OS task manger bar. I think these problems chould be solved by implementing from some dbus event(or some common OS libraries)?
I found deepin(DE)'s filemanager used the Qt.FramelessWindowHint flag and implement their own hide/show functions via X11( see https://github.com/linuxdeepin/dde-file-manager/blob/master/widgets/dwindowframe.cpp#L512 ), maybe we can add some wayland handle like this.
@SunRain Yeah Qt.FramelessWindowHint should work on all desktops, and X11 as well.
We don't need to use platform specific code for minimize, maximize and close, we can do it with the Qt API.
However what we need is Qt hooks to trigger window move and resize from the client side QML decoration.
QPlatformWindow has a startSystemResize() method to trigger platform specific code for resize, and once this patch is integration it will have a startSystemMove() as well: https://codereview.qt-project.org/#/c/150399/
EDIT: What I was talking about earlier is more Liri OS implementation details, we need a way to know when a Qt client app wants to decorate itself or not. If the Qt client don't decorate itself will need to draw server decorations, but it falls in a separate issue elsewhere.
Moving windows from the decoration will be possible with Qt 5.11 (on X11 and Wayland at least).
https://imgur.com/avidazd
Do you have some working example code? I would like to test working qml csd.
Not yet because I don't have a Qt 5.11 build right now.
is this yet ready for testing? looks great!
I would really love to see CSD as part of Liri's apps. I guess having it as part of fluid would define these UX as a more generic approach. As for a technical proof of concept see https://github.com/johanhelsing/qt-csd-demo
It seems that the needed functionality is about to be included in Qt 5.15 (https://bugreports.qt.io/browse/QTBUG-73011)
Qt 5.15 alpha was just released: https://www.qt.io/blog/qt-5.15-alpha-released
The qt-csd-demo mentioned in my last post was already updated aswell. I am really excited and hope this featere will be introduced in fluid soon ;)
There is still something missing in Qt. As part of client-side decorations we want to draw drop shadows as a margin around the actual window contents, but there is no API to set this. For now we can implement client-side decorations in Fluid without drop shadows and wait for Qt 6, because Qt 5.15 is the last 5.x iteration and we can't add a new feature now.
Sounds like a plan! Rome wasn't built in a single day aswell :) if I can help in any means but coding, please let me know