Open hmaarrfk opened 1 month ago
I'm really not sure why this happens, but there seems to be some discrepancies between the demo application and "other applications".
I wonder if the original issues reported in #103 and #111 are still valid in 2024. I removed the line that had the comments relating to them:
https://github.com/ColinDuquesnoy/QDarkStyleSheet/blob/6f3962e63749893f951be73ebfec93e83fffebf2/qdarkstyle/qss/_styles.scss#L1309C1-L1310C23
and things seem OK.
The problem with these lines is that they make the QComboBox look too high compared to other widgets that might be next to it like a button.
import re from PySide6.QtWidgets import QApplication, QMainWindow, QWidget, QHBoxLayout, QComboBox, QPushButton from qdarkstyle import load_stylesheet class MainWindow(QMainWindow): def __init__(self): super().__init__() # Create central widget central_widget = QWidget() self.setCentralWidget(central_widget) # Create layout layout = QHBoxLayout() central_widget.setLayout(layout) # Create combo box with 3 items combo_box = QComboBox() combo_box.addItems(["Item 1 gyjqtA", "Item 2", "Item 3"]) # Create push button button = QPushButton("hello") # Add widgets to layout layout.addWidget(combo_box) layout.addWidget(button) app = QApplication([]) stylesheet = load_stylesheet() # stylesheet = re.sub(r'\s*/\* Fixes #103, #111 \*/\s*\n\s*min-height: 1\.5em;\s*', '', stylesheet) app.setStyleSheet(stylesheet) window = MainWindow() window.show() app.exec()
With those two lines
import re stylesheet = re.sub(r'\s*/\* Fixes #103, #111 \*/\s*\n\s*min-height: 1\.5em;\s*', '', stylesheet)
Patching them out:
Thanks making this theme cool!
I'm really not sure why this happens, but there seems to be some discrepancies between the demo application and "other applications".
I wonder if the original issues reported in #103 and #111 are still valid in 2024. I removed the line that had the comments relating to them:
https://github.com/ColinDuquesnoy/QDarkStyleSheet/blob/6f3962e63749893f951be73ebfec93e83fffebf2/qdarkstyle/qss/_styles.scss#L1309C1-L1310C23
and things seem OK.
The problem with these lines is that they make the QComboBox look too high compared to other widgets that might be next to it like a button.
With those two lines![image](https://github.com/ColinDuquesnoy/QDarkStyleSheet/assets/90008/00a8b486-ab13-4f7d-babf-ed44cf72850c)
Patching them out:![image](https://github.com/ColinDuquesnoy/QDarkStyleSheet/assets/90008/1580de96-9fe2-4737-870e-7e62820f0e94)
Thanks making this theme cool!