Giter Site home page Giter Site logo

breezestylesheets's Introduction

no thoughts. only head empty.

About Me

Just a former biologist who got bored enough with Excel to start writing scripts to automate that process. Next thing, I'm optimizing floating-point parsers cross-compiled to a Raspberry Pi. Thinking is overrated and we should do less of it.

My Skills

A few of my accomplishments:

  • Author of the Rust core library float parser.
  • Creator of rust-lexical, which implements fast float parsing and writing algorithms, used in polars and more.
  • Designed the digit comparison algorithm for unambiguous floating-point parsing for near-halfway cases, used in fast float and rust-lexical.
  • Designed stylish, customizable light and dark Qt stylesheets.
  • Maintainer for cross-rs, for minimal setup cross-compilation on Rust.
  • Author of xcross, a port of cross-rs for C/C++ projects with vcpkg and conan integrations.
  • is unable to think during the summer heat.

Stats

breezestylesheets's People

Contributors

alexhuszagh avatar chaosink avatar eblade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

breezestylesheets's Issues

Typo issue in breeze_resouces.py

Hello,

First I would like to thank you for your great work!

There is a small typo issue in the filename.
There is a missing r at the end. It should be breeze_resources.py. So the file dark.py and light.py are returning an error.

Thanks.

[BUG] Placeholder Text in QLineEdit Not Greyed Out

Description

Normally, placeholder text when a text edit is empty should have a different display color than the regular text. However, QLineEdit does not have this currently, incorrectly showing it as the same display color. This also affects editable QComboxes.

Screenshot_20220429_235852

[BUG] QColumnView Size Grip Expands View

Description

Hovering over the size grips in a QColumnView expands the widget, and does not trigger the size grips correctly. Dissecting the issue, I've found the offending commit is the patch for #11, specifically, d620f22, and the offending code is:

QWidget:disabled:hover
{
    background-color: ^background^;
}

Removing this fixes the issue, however, it might cause ripple effects.

Overhaul Windows UI

Right now, there's a few issues that lead to massive issues with the Windows UI. This will be a status update, with incremental fixes being displayed.

Ugly Table Sort Arrow

Issue

The table sort arrow currently is placed at the top, with padding, which leads to some unsightly UIs, and isn't great for the default.

TableSortIndicator

Is this project abandoned?

While I don't want to tell anybody in an open source project how to spend their time, I've posted an issue (#14) a month ago and received no responses.
I also see that the last merge (#9) is from late 2018 and the last reply from the repo owner is early 2019 (#10) with a fix for an issue from another user that was never merged (#13).

I'm guessing if I don't get a reply that this project is abandoned, I hope this issue will help other (potential new) users understand the status!

[BUG] No Hover Event for QCompleter in Qt5

Description

There is no hover event properly highlighting the selected element in a QCompleter in Qt5 (works in Qt6). Right here, "Fruits Basket" is hovered, but there's no highlight event.

Completer

Consider supporting githubuser0xFFFF/Qt-Advanced-Docking-System

Hello

The advanced docking system is really a great docking system for Qt. It uses an internal stylesheet to make it look like this:

imagem

When trying to use the stylesheet provided here without any changes, this happens:

imagem

What happens is that Qt-ADS uses an internal stylesheet to keep things in order.

If the internal stylesheet is disabled, this happens:

imagem

Notice how in particular the icons are wrong (like a double icon in one of them), and the tabs aren't clear, etc.

imagem

I guess it would require these things:

https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/tree/master/src/stylesheets

To be included in the theme.

Anyway, thanks for this work! It's amazing!

Bug Using Test Suite with Default Settings

Description

Running the test suite currently raises an error of an invalid widget type if called without using --widget all. This should be the default.

$ python3 test/ui.py
Traceback (most recent call last):
  File "/home/ahuszagh/git/BreezeStyleSheets/test/ui.py", line 963, in test
    function = globals()[f'test_{test_widget}']
KeyError: 'test_None'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ahuszagh/git/BreezeStyleSheets/test/ui.py", line 1031, in <module>
    sys.exit(main())
  File "/home/ahuszagh/git/BreezeStyleSheets/test/ui.py", line 1026, in main
    test(args, sys.argv[:1] + unknown, args.widget)
  File "/home/ahuszagh/git/BreezeStyleSheets/test/ui.py", line 965, in test
    raise NotImplementedError(f'test for {test_widget} not implemented')
NotImplementedError: test for None not implemented

Enable Customizing Colors

A major enhancement has been the use of templates to auto-generate most of the files. This means that customizing your own color palettes should be doable, which might be great, say, for using purple or green for highlights rather than blues for custom themes.

Missing Icons in Test Suite

Description

Running the test suite with all widgets produces the following error messages:

qt.svg: Cannot open file ':/native/close.svg', because: No such file or directory
qt.svg: Cannot open file ':/native/close.svg', because: No such file or director

QFileDialog icons are missing

When using PyQT5 and either light or dark theme, the icons in a QFileDialog are not there, and just empty buttons.
light_issue

Without the theme:
system

Called with the code:

        filename = QtWidgets.QFileDialog.getOpenFileName( self, caption="Open Video")

Edit: Super simple program that auto opens the dialog to test with:

import sys

from PyQt5.QtCore import *
from PyQt5.QtWidgets import *

import breeze_resources

class Window(QMainWindow):
    def __init__(self, parent=None):
        super().__init__(parent)
        self.resize(400, 200)
        QFileDialog.getOpenFileName()
        raise Exception("end app")

if __name__ == "__main__":
    app = QApplication(sys.argv)
    file = QFile(f":/light/stylesheet.qss")
    file.open(QFile.ReadOnly | QFile.Text)
    stream = QTextStream(file)
    app.setStyleSheet(stream.readAll())
    win = Window()
    win.show()
    sys.exit(app.exec_())


How to use this with CMake

Hey! Thanks again for all the support with Qt-ADS!

I wanted to give something back, so here's a text on how to use your amazing work with projects built with CMake. Feel free to include it on your readme if you want:

First, this is what you need on your cmake file:

# This is how I usually setup Qt (makes it work with both Qt5 and Qt6 at the same time
# Setup Qt
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

find_package(
  QT NAMES Qt6 Qt5
  COMPONENTS Core
  REQUIRED)
find_package(
  Qt${QT_VERSION_MAJOR}
  COMPONENTS ${AE_REQUIRED_QT_COMPONENTS}
  REQUIRED)
# -------------------

# For this library:

# Get Python
find_package(Python COMPONENTS Interpreter)

include(FetchContent)

set(FETCHCONTENT_QUIET
    OFF
    CACHE BOOL "Silence fetch content" FORCE)

FetchContent_Declare(
  breeze_stylesheets
  GIT_REPOSITORY https://github.com/Alexhuszagh/BreezeStyleSheets.git
  GIT_TAG origin/master
  GIT_PROGRESS ON
  USES_TERMINAL_DOWNLOAD TRUE)

FetchContent_GetProperties(breeze_stylesheets)
if(NOT breeze_stylesheets_POPULATED)
  FetchContent_Populate(breeze_stylesheets)

  add_library(breeze_themes STATIC "${breeze_stylesheets_SOURCE_DIR}/breeze_themes.qrc")

  add_custom_target(
    run_python_breeze ALL
    COMMAND ${Python_EXECUTABLE} configure.py --extensions=advanced-docking-system
            --styles=dark-green,light-green --resource breeze_themes.qrc
    WORKING_DIRECTORY ${breeze_stylesheets_SOURCE_DIR}
    BYPRODUCTS "${breeze_stylesheets_SOURCE_DIR}/breeze_themes.qrc"
    COMMENT "Generating themes")

  add_dependencies(breeze_themes run_python_breeze)

endif()

And then, add your executable and link with the created library:

add_executable(myapp WIN32 MACOSX_BUNDLE "main.cpp")
target_link_libraries(myapp PRIVATE Qt${QT_VERSION_MAJOR}::Widgets breeze_themes)

On your main.cpp file you need to manually init the resources because they are coming from an external library:

// ...
QApplication qapp(argc, argv);

Q_INIT_RESOURCE(breeze_themes);
QFile file(":/dark-green/stylesheet.qss");
file.open(QFile::ReadOnly | QFile::Text);
QTextStream stream(&file);
qapp.setStyleSheet(stream.readAll());

CMake install

The CMake install documentation still lists a file called "breeze_themes.qrc". Looks like this file got renamed to "breeze.qrc".

[BUG] QDial not Styled

Description

The QDial does not have correct styles, leading to too dark notches and too light background styling in the dark theme. The light theme is better, but potentially could be made better.

Screenshot_20220430_083601
Screenshot_20220430_083731

QHeaderView Sections not Properly Padded in Qt6

Issue

Using text-align: center;, the sections are still incorrectly padded on the bottom (for vertical elements) and on the right (for horizontal elements). This only occurs in Qt6.

Qt6

Screenshot_20220429_090553

Qt5

Screenshot_20220429_090739

This also affects the solution for #35.

UI File

Where can I find the ui file

[BUG] QColumnView Has Border When not Focused

Description

When not focused, a QColumnView has a border around it. It should potentially have a highlight border when hovered/selected, but it should not have a border when not focused.
QColumnView

Disabled menu can't be seen completely in dark theme

Hi

I like how light theme behave. The disabled menu/button still appear and readable but can't be selected/highlighted. In contrary, those menu/button in dark theme completely unreadable

company

company1

is this expected behavior ?

Thanks for Breeze

Checkbox not shown in dark mode

When using the dark stylesheet, checkboxes are not displayed properly. Only the test is visible. See attached images comparing the default Qt stylesheet versus the dark stylesheet.

Qt 6.2.2 with C++ in Visual Studio 2022 with Qt Visual Studio Tools version 2.8.1 (rev.6)

image

image

[BUG] QSlider Ticks Invisible

Description

The ticks for a QSlider widget are the same color as the background in both the light and dark themes.

Screenshot_20220430_092115

Unexpected Table Item Padding in PyQt6

Issue

Using PyQt6, the table items/headers have unexpected padding under the elements, which means with the default item sizes they are practically illegible. This differs friom both the native theme and PyQt5.

PyQt6 Dark

Padding Dark

PyQt5 Dark

Padding Dark Qt5

PyQt6 Native

Padding Native

[FEATURE] Add Complete Standard Icon Pack

Problem

For applications that wish to override all standard icons to fit with the BreezeStyleSheets theme, we currently do not provide a complete icon set.

Solution

This could be provided as an extension, with SVG icons provided for all standard icons.

Simplify Tracking/Untracking Build Files

Issue

We want to ensure files in the dist directory are tracked for the default themes, but should be able to untrack/retrack these files when developing custom themes or files with extensions, to avoid updating resource files unnecessarily in Git.

Borders on windows

Hi, I decided to learn something about PyQt so started developing some simple app. I'm working on Linux, but I would like to run my app on windows also. I really like the dark style whick looks great on Linux.
I noticed that when I run it on Windows 10, borders around almost all widgets are missing. For example that nice blue border around buttons when hovered. Do you know some quick fix for this?

Thank you for your work!

Question: compiling and adding to project

I may want to add this to a project I am working on and have a question on this;
The readme says to compile the style sheets to use them. Does that mean that every user of the project need to compile the dark theme or when does this happen?

If the theme needs to be compiled every time, is there a trick to have this be done automagically on the first time the software runs?

qt.svg can't open some svg files

qt.svg: Cannot open file ':/dark/transparent.svg', because: No such file or directory
qt.svg: Cannot open file ':/dark/transparent.svg', because: No such file or directory
qt.svg: Cannot open file ':/dark/transparent.svg', because: No such file or directory
qt.svg: Cannot open file ':/dark/transparent.svg', because: No such file or directory
qt.svg: Cannot open file ':/dark/down_arrow.svg', because: No such file or directory
qt.svg: Cannot open file ':/dark/down_arrow.svg', because: No such file or directory

Style seems applied sucessfully, but some details lost.

I'm using Qt5.11 with C++ on msvc14.

THX

No breeze.py

dark.py and light.py need breeze.py which doesn't exist.

And, app->setStyleSheet() should be app.setStyleSheet().

Move Configured Templates to `dist`

Issue

Configured files should be isolated from the remaining project files, and all exist under dist/. PyQt6 uses a different resource system than PyQt5 and C++ Qt, so these should have different subdirectories since both the light and dark themes without extensions for both resources should be tracked by Git.

Standard Icons are not Overwritten

Issue

Standard icons are only being overwritten in QDialogButtonBox and QMessageBox, leading to ugly icons like the following:
QMenu

This is because the icons are only overwritten here:

QDialogButtonBox
{
    dialogbuttonbox-buttons-have-icons: true;

    dialog-cancel-icon: url(^style^dialog_cancel.svg);
    dialog-close-icon: url(^style^dialog_close.svg);
    dialog-ok-icon: url(^style^dialog_ok.svg);
    dialog-open-icon: url(^style^dialog_open.svg);
    dialog-reset-icon: url(^style^dialog_reset.svg);
    dialog-save-icon: url(^style^dialog_save.svg);
    /**
     *  No support yet for overriding saveall.
     *  dialog-saveall-icon: url(^style^dialog_saveall.svg);
     */
    dialog-yes-icon: url(^style^dialog_ok.svg);
    dialog-help-icon: url(^style^dialog_help.svg);
    dialog-no-icon: url(^style^dialog_no.svg);
    dialog-apply-icon: url(^style^dialog_ok.svg);
    dialog-discard-icon: url(^style^dialog_discard.svg);
}

QMessageBox
{
    messagebox-critical-icon: url(^style^message_critical.svg);
    messagebox-information-icon: url(^style^message_information.svg);
    messagebox-question-icon: url(^style^message_question.svg);
    messagebox-warning-icon: url(^style^message_warning.svg);
}

Solution

This might not be possible with stylesheets (it's unlikely), so I need to clearly document how to do this with actual code.

Question for MIT compliance

Hi, thank you for your project, I added generated theme into my opensource (MIT) project:
https://github.com/mapron/d2modgen
I already added link in "Used thirdparty products" in readme.md. Though not sure if it's enough.
I am not adding your sources to my repo; also, I do not distribute full license with binary package (so in binary release, you can't see thirdarty license).
Is it ok for you? Fair enough?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.