fedoraqt / adwaita-qt Goto Github PK
View Code? Open in Web Editor NEWA style to bend Qt applications to look like they belong into GNOME Shell
License: Other
A style to bend Qt applications to look like they belong into GNOME Shell
License: Other
The current Adwaita-Qt groupbox style does not match Gtk/GNOME:
According to Qt docs on QProgressBar, "If minimum and maximum both are set to 0, the bar shows a busy indicator instead of a percentage of steps"; the animated busy indicator should bounce back and forth, similarly to gtk_progress_bar_pulse() on Gtk's progress bar widget.
This functionality is currently unimplemented in the Adwaita theme; instead of an animated busy indicator, the progress bar is drawn in an "uninitialized mode", as can be reproduced by the code below. The absence of busy indicator may be problematic as the user may misinterpret it as a lack of application's activity.
Code to reproduce:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
from PyQt5.QtWidgets import (QWidget, QProgressBar, QPushButton, QApplication, QVBoxLayout, QHBoxLayout)
from PyQt5.QtCore import (QBasicTimer, Qt)
class Example (QWidget):
def __init__(self):
super().__init__()
self.setLayout(QVBoxLayout())
# Horizontal bar
pbar_h = QProgressBar(self)
self.layout().addWidget(pbar_h)
pbar_h.setRange(0, 0)
# Vertical bar
pbar_v = QProgressBar(self)
pbar_v.setOrientation(Qt.Vertical)
self.layout().addWidget(pbar_v)
pbar_v.setRange(0, 0)
self.resize(800, 600)
self.setWindowTitle('Progress bar example')
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
This is from KeePassX:
For comparison, this is the System Monitor:
I'm not sure if the colour is my fault or not, also there should be a thicker grey bar on the top, but the text should be left aligned, not center, and bold.
Also, is it possible to actually set the font to bold? Adwaita uses bold in many places, but I haven't seen them in any Qt themes.
rrs@chutzpah:/var/tmp/adwaita-qt-0.5/build$ make
[ 20%] Automatic moc for target adwaita-qt5
[ 20%] Built target adwaita-qt5_automoc
Scanning dependencies of target adwaita-qt5
[ 40%] Building CXX object src/style/CMakeFiles/adwaita-qt5.dir/adwaita.cpp.o
[ 60%] Linking CXX shared module adwaita.so
[100%] Built target adwaita-qt5
19:32 ___ _
rrs@chutzpah:/var/tmp/adwaita-qt-0.5/build$ make install
[ 20%] Automatic moc for target adwaita-qt5
[ 20%] Built target adwaita-qt5_automoc
[100%] Built target adwaita-qt5
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/stow/adwaita-qt/share/themes/Adwaita/qt/assets
CMake Error at assets/cmake_install.cmake:44 (file):
file INSTALL cannot make directory
"/usr/local/stow/adwaita-qt/share/themes/Adwaita/qt/assets": No such file
or directory
Call Stack (most recent call first):
cmake_install.cmake:37 (include)
Makefile:61: recipe for target 'install' failed
make: *** [install] Error 1
19:32 ___ _ => 2
Copied from FedoraQt/QGnomePlatform#22 :
Hi,
I'm using a GBA emulator using Qt 5 called mGBA on Fedora 25,
QGnomePlatform, which is shipped by default since this release, causes this weird graphical artifact on mGBA
When I remove QGnomePlatform, this bug disappears.
According to one developer of mGBA (mgba-emu/mgba#514), the problem needs to be fixed upstream.Do you think it is possible to fix it on your side ?
Confirmed this bug is related to adwaita.
Partially related to #37, but conceptually a separate issue.
The width of spin box buttons is set as 1.2 times spin box height, which means that if spin box is set to expand vertically, the buttons will grow in horizontal direction. This is inconsistent with the Gtk version of adwaita, where the buttons grow only in vertical direction.
Minimal working examples:
#include <QtWidgets>
int main (int argc, char **argv)
{
QApplication app(argc, argv);
QWidget window;
window.setWindowTitle("Spin box test");
QGridLayout *layout = new QGridLayout();
window.setLayout(layout);
QSpinBox spinBox;
spinBox.setRange(0, 9999999);
spinBox.setValue(1000);
spinBox.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
layout->addWidget(&spinBox);
window.show();
return app.exec();
}
and
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class SpinButtonWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="SpinButton Gtk")
self.set_border_width(10)
hbox = Gtk.Box(spacing=6)
self.add(hbox)
adjustment = Gtk.Adjustment(0, 0, 9999999, 1, 10, 0)
self.spinbutton = Gtk.SpinButton()
self.spinbutton.set_adjustment(adjustment)
self.spinbutton.set_value(1000)
hbox.pack_start(self.spinbutton, True, True, 0)
win = SpinButtonWindow()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
Seriously, I still can't get it straight. I know how to change the Qt4 theme thru qtconfig-qt4
, but they still show icons in menus and buttons. And I tried setting the Qt5 theme with qt5ct
, and with these variables, which I found somewhere, no documentation whatsoever:
export QT_QPA_PLATFORMTHEME=qt5ct
But I still can't get the colour scheme to work. What configuration do you have?
Thanks for the great work though. The last commits were superb!
ALT Linux gcc 5.3.1, qt 5.6.2
[ 76%] Building CXX object style/CMakeFiles/adwaita-qt4.dir/adwaitamnemonics.cpp.o
In file included from /usr/src/RPM/BUILD/adwaita-qt-0.97/style/adwaitahelper.cpp:20:0:
/usr/src/RPM/BUILD/adwaita-qt-0.97/style/adwaitahelper.h: In static member function 'static QColor Adwaita::Helper::mix(const QColor&, const QColor&, qreal)':
/usr/src/RPM/BUILD/adwaita-qt-0.97/style/adwaitahelper.h:72:27: error: 'isnan' was not declared in this scope
if (isnan(bias)) return c1;
^
/usr/src/RPM/BUILD/adwaita-qt-0.97/style/adwaitahelper.h:72:27: note: suggested alternative:
In file included from /usr/include/c++/5/random:38:0,
from /usr/include/c++/5/bits/stl_algo.h:66,
from /usr/include/c++/5/algorithm:62,
from /usr/include/qt4/QtCore/qglobal.h:68,
from /usr/include/qt4/QtCore/QFlags:1,
from /usr/src/RPM/BUILD/adwaita-qt-0.97/style/adwaita.h:23,
from /usr/src/RPM/BUILD/adwaita-qt-0.97/style/adwaitahelper.h:24,
from /usr/src/RPM/BUILD/adwaita-qt-0.97/style/adwaitahelper.cpp:20:
/usr/include/c++/5/cmath:641:5: note: 'std::isnan'
isnan(_Tp __x)
^
/usr/src/RPM/BUILD/adwaita-qt-0.97/style/adwaitahelper.cpp: In member function 'void Adwaita::Helper::renderCheckBox(QPainter*, const QRect&, const QColor&, const QColor&, const QColor&, bool, Adwaita::CheckBoxState, qreal) const':
/usr/src/RPM/BUILD/adwaita-qt-0.97/style/adwaitahelper.cpp:835:15: warning: unused variable 'radius' [-Wunused-variable]
qreal radius( frameRadius() );
^
make[2]: *** [style/CMakeFiles/adwaita-qt4.dir/adwaitahelper.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/usr/src/RPM/BUILD/adwaita-qt-0.97/x86_64-alt-linux-qt4/BUILD'
make[1]: *** [style/CMakeFiles/adwaita-qt4.dir/all] Error 2
make[1]: Leaving directory `/usr/src/RPM/BUILD/adwaita-qt-0.97/x86_64-alt-linux-qt4/BUILD'
make: *** [all] Error 2
make: Leaving directory `/usr/src/RPM/BUILD/adwaita-qt-0.97/x86_64-alt-linux-qt4/BUILD'
error: Bad exit status from /usr/src/tmp/rpm-tmp.38867 (%build)
Like umbrello or drkonqi
The title says it all.
Browsing preferences (F4) in goldendict 1.5 causes segmentation fault in adwaita.so
I'm the developer of qutebrowser, which has a heavily customized tabbar with a custom style.
With adwaita-qt5, this appears under the tabbar:
It's colored according to QPalette::Window
.
I've tried various things in my style to make it go away, without any luck so far, so I'd appreciate some help!
Spin buttons are too large and year 2015 doesn't fit into entry field.
KeePassX 0.4.3, Fedora 22 with GNOME 3.16
For example in QDateTimeEdit
Please, add screenshot in readme! It would be easy to see what it looks lik
Hello!
First of all, thank you for your nice idea porting Adwaita to QT! B-)
It seems the background color isn't #EDEDED anymore since GTK 3.16 but now #E9E9E9. I could change it for GTK 2, Openbox… themes but I couldn't for QT (both 4 and 5 versions). Moreover, the same bug affects the menus background.
Can you update it, please ?
Thank you in advance and have a nice day! :-)
If I try desktop settings, it goes with the horrible Win98-era GUI. Dunno what the problem may be.
EDIT: I can't manually select adwaita from skype either.
Seems the underline is overflowing to the sides too
Being the pixel perfect guy that I am, I noticed something was amiss while fixing stuff after a bad font upgrade.
It looks like in Qt5, the top menu text has padding of one pixel above and below the text more than it should, making the bar two pixels higher than it should.
In Qt4, it's offsetted by one pixel to the right.
After the cantarell upgrade it looks even worse, but I believe its it's fault.
I'm trying to package this for the AUR since no-one seems willing to do it. I would do this happily, but I have no experience with packaging (or compiling) QT themes and I can't find any instructions either. Thanks.
Same kind of issue as #41, except this time for combo boxes.
Examples:
#include <QtWidgets>
int main (int argc, char **argv)
{
QApplication app(argc, argv);
QWidget window;
window.setWindowTitle("Combo Box QT");
QGridLayout *layout = new QGridLayout();
window.setLayout(layout);
QComboBox comboBox;
comboBox.setEditable(true);
comboBox.addItem("First", 1);
comboBox.addItem("Second: long-text entry", 2);
comboBox.addItem("Third", 2);
comboBox.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
layout->addWidget(&comboBox);
window.show();
return app.exec();
}
and
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class ComboBoxWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="Combo box GTK")
self.set_border_width(10)
store = Gtk.ListStore(str)
store.append(["First"])
store.append(["Second: long-text entry"])
store.append(["Third"])
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
combo = Gtk.ComboBox.new_with_model_and_entry(store)
combo.set_entry_text_column(0)
vbox.pack_start(combo, True, True, 0)
self.add(vbox)
win = ComboBoxWindow()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
Result:
It actually seems that Gtk version slightly underestimates the required field width as well; but it clearly does not grow the arrow button in horizontal direction.
Look at the two attached screenshots of Qt Assistant: first with Adwaita, second with Fusion. Width of the tabs is the same, but Adwaita is not able to display the text on the tabs. Instead of (at least) “Bookma…”, it shows only “Bo…”, which is not very informative.
It is the default configuration of Qt Assistant window.
Hi,
I just tried the adwaita-qt5 theme with aqemu 0.9.2.
https://github.com/tobimensch/aqemu
aqemu looks fine with the qt-gtk theme and breeze.
But with adwaita there are multiple issues:
Why are the tabs in the main window on the right and not on the left?
Why are the listviews with "Device Manager", "Folder Sharing" and so on
in them far too small in height. The height is just fine with gtk-qt and breeze.
Why are there about 20 pixels of unused space on the right next to splitter
next to the machines list? I couldn't find any widget that has a margin or
another reason for it.
The memory combobox in the "VM" tab is too small.
First I wanted to hack adwaita support into my application, but it strikes me
as the wrong solution to fix my application for every theme.
I would be pleased if you could help me with this!
Kind regards
Before anything, thanks for doing this!
Having a consistent look between toolkits is something I've been looking for a while (I don't like the oxygen theme very much).
Gnome/Adwaita has an option for "Global Dark Theme".
Please provide such option for this theme as well.
When run under GNOME, applications should not show icons on pushbuttons, or menus - this can be enforced by Adwaita Qt
Examples include qTox and adding a new tile in otter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.