Bug fixes for various UI elements.
- Added tests for tooltips and sortable tables. - Fixed pixelated radio icons. - Fixed arrow placement in QTableView for sorting. - Fixed text placement in QGroupBoxes.main
|
@ -1,7 +1,4 @@
|
|||
<svg width="100" height="100">
|
||||
<g transform="scale(5)">
|
||||
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="^0^" fill-rule="evenodd"/>
|
||||
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="^0^" fill-rule="evenodd"/>
|
||||
<path d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0" fill="^0^" fill-rule="evenodd"/>
|
||||
</g>
|
||||
<circle cx="50" cy="50" r="40" stroke="^0^" stroke-width="10" fill="none" />
|
||||
<circle cx="50" cy="50" r="25" fill="^0^" />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 164 B |
|
@ -1,6 +1,3 @@
|
|||
<svg width="100" height="100">
|
||||
<g transform="scale(5)">
|
||||
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="^0^" fill-rule="evenodd"/>
|
||||
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="^0^" fill-rule="evenodd"/>
|
||||
</g>
|
||||
<circle cx="50" cy="50" r="40" stroke="^0^" stroke-width="10" fill="none" />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 278 B After Width: | Height: | Size: 117 B |
5994
breeze_resources.py
|
@ -1,7 +1,4 @@
|
|||
<svg width="100" height="100">
|
||||
<g transform="scale(5)">
|
||||
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
|
||||
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
|
||||
<path d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0" fill="#58d3ff" fill-rule="evenodd"/>
|
||||
</g>
|
||||
<circle cx="50" cy="50" r="40" stroke="#58d3ff" stroke-width="10" fill="none" />
|
||||
<circle cx="50" cy="50" r="25" fill="#58d3ff" />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 172 B |
|
@ -1,7 +1,4 @@
|
|||
<svg width="100" height="100">
|
||||
<g transform="scale(5)">
|
||||
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
|
||||
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
|
||||
<path d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0" fill="#c8c9ca" fill-rule="evenodd"/>
|
||||
</g>
|
||||
<circle cx="50" cy="50" r="40" stroke="#c8c9ca" stroke-width="10" fill="none" />
|
||||
<circle cx="50" cy="50" r="25" fill="#c8c9ca" />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 172 B |
|
@ -1,6 +1,3 @@
|
|||
<svg width="100" height="100">
|
||||
<g transform="scale(5)">
|
||||
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
|
||||
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
|
||||
</g>
|
||||
<circle cx="50" cy="50" r="40" stroke="#58d3ff" stroke-width="10" fill="none" shape-rendering="geometricPrecision"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 157 B |
|
@ -1,6 +1,3 @@
|
|||
<svg width="100" height="100">
|
||||
<g transform="scale(5)">
|
||||
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
|
||||
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
|
||||
</g>
|
||||
<circle cx="50" cy="50" r="40" stroke="#c8c9ca" stroke-width="10" fill="none" />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 121 B |
11
example.py
|
@ -445,12 +445,18 @@ class Ui:
|
|||
self.actionSub_menu.setToolTip(_translate('MainWindow', 'submenu'))
|
||||
self.actionAction_C.setText(_translate('MainWindow', 'Action &C'))
|
||||
|
||||
def about(self):
|
||||
QtWidgets.QMessageBox.about(self.centralwidget, 'About Menu', 'Sample about menu')
|
||||
|
||||
|
||||
def main(argv=None):
|
||||
'Application entry point'
|
||||
|
||||
args, unknown = parser.parse_known_args(argv)
|
||||
os.environ['QT_SCALE_FACTOR'] = str(args.scale)
|
||||
if args.scale != 1:
|
||||
os.environ['QT_SCALE_FACTOR'] = str(args.scale)
|
||||
else:
|
||||
os.environ['QT_AUTO_SCREEN_SCALE_FACTOR'] = '1'
|
||||
if args.style != 'native':
|
||||
style = QtWidgets.QStyleFactory.create(args.style)
|
||||
QtWidgets.QApplication.setStyle(style)
|
||||
|
@ -483,6 +489,9 @@ def main(argv=None):
|
|||
])
|
||||
window.setWindowTitle('Sample BreezeStyleSheets application.')
|
||||
|
||||
# Add event triggers
|
||||
ui.actionAction.triggered.connect(ui.about)
|
||||
|
||||
# tabify dock widgets to show bug #6
|
||||
window.tabifyDockWidget(ui.dockWidget1, ui.dockWidget2)
|
||||
|
||||
|
|
21
test.py
|
@ -333,7 +333,6 @@ def main(argv=None):
|
|||
checkbox_font.setPointSizeF(50.0)
|
||||
child[-1].setFont(checkbox_font)
|
||||
elif args.widget == 'table':
|
||||
# TODO(ahuszagh) Going to need arrows here...
|
||||
child = QtWidgets.QTableWidget(widget)
|
||||
child.setColumnCount(2)
|
||||
child.setRowCount(4)
|
||||
|
@ -349,6 +348,23 @@ def main(argv=None):
|
|||
child.setHorizontalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem('Column 2')
|
||||
child.setHorizontalHeaderItem(1, item)
|
||||
elif args.widget == 'sortable_table':
|
||||
child = QtWidgets.QTableWidget(widget)
|
||||
child.setSortingEnabled(True)
|
||||
child.setColumnCount(2)
|
||||
child.setRowCount(4)
|
||||
item = QtWidgets.QTableWidgetItem('Row 1')
|
||||
child.setVerticalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem('Row 2')
|
||||
child.setVerticalHeaderItem(1, item)
|
||||
item = QtWidgets.QTableWidgetItem('Row 3')
|
||||
child.setVerticalHeaderItem(2, item)
|
||||
item = QtWidgets.QTableWidgetItem('Row 4')
|
||||
child.setVerticalHeaderItem(3, item)
|
||||
item = QtWidgets.QTableWidgetItem('Column 1')
|
||||
child.setHorizontalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem('Column 2')
|
||||
child.setHorizontalHeaderItem(1, item)
|
||||
elif args.widget == 'list':
|
||||
child = QtWidgets.QListWidget(widget)
|
||||
for index in range(10):
|
||||
|
@ -510,6 +526,9 @@ def main(argv=None):
|
|||
QtWidgets.QAction('&Action 9', window),
|
||||
QtWidgets.QAction('&Action 10', window),
|
||||
])
|
||||
elif args.widget == 'tooltip':
|
||||
child = QtWidgets.QPushButton('Sample Label')
|
||||
child.setToolTip('Sample Tooltip')
|
||||
else:
|
||||
raise NotImplementedError
|
||||
|
||||
|
|
|
@ -61,22 +61,6 @@ QWidget:disabled
|
|||
background-color: #31363b;
|
||||
}
|
||||
|
||||
QWidget::item:hover
|
||||
{
|
||||
background-color: #3daee9;
|
||||
color: #eff0f1;
|
||||
}
|
||||
|
||||
QWidget::item:selected
|
||||
{
|
||||
background-color: #3daee9;
|
||||
}
|
||||
|
||||
QWidget:focus
|
||||
{
|
||||
border: 0.04em solid #3daee9;
|
||||
}
|
||||
|
||||
QCheckBox
|
||||
{
|
||||
spacing: 0.23em;
|
||||
|
@ -97,6 +81,13 @@ QGroupBox
|
|||
min-height: 1.2em;
|
||||
border: 0.04em solid #76797c;
|
||||
border-radius: 0.09em;
|
||||
/**
|
||||
* This gives us enough space at the top to ensure we can move the
|
||||
* title to be inside the guidelines, and the padding at the top
|
||||
* ensures we have space below the title.
|
||||
*/
|
||||
margin-top: 0.5em;
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
QGroupBox:focus
|
||||
|
@ -107,10 +98,13 @@ QGroupBox:focus
|
|||
|
||||
QGroupBox::title
|
||||
{
|
||||
/* We need to move 0.6em up to be inside the lines, +1em for padding. */
|
||||
top: -1.6em;
|
||||
subcontrol-origin: content;
|
||||
background: transparent;
|
||||
subcontrol-position: top center;
|
||||
padding-right: 1em;
|
||||
background: #31363b;
|
||||
padding-left: 0.2em;
|
||||
padding-right: 0.2em;
|
||||
}
|
||||
|
||||
QCheckBox::indicator
|
||||
|
@ -288,6 +282,13 @@ QMenu::item
|
|||
QMenu::item:selected
|
||||
{
|
||||
color: #eff0f1;
|
||||
background-color: #3daee9;
|
||||
}
|
||||
|
||||
QMenu::item:hover
|
||||
{
|
||||
color: #eff0f1;
|
||||
background-color: #3daee9;
|
||||
}
|
||||
|
||||
QMenu::separator
|
||||
|
@ -553,14 +554,6 @@ QPlainTextEdit
|
|||
border: 0.04em solid #76797c;
|
||||
}
|
||||
|
||||
QHeaderView::section
|
||||
{
|
||||
background-color: #76797c;
|
||||
color: #eff0f1;
|
||||
padding: 0.23em;
|
||||
border: 0.04em solid #76797c;
|
||||
}
|
||||
|
||||
QSizeGrip
|
||||
{
|
||||
border-image: url(:/dark/sizegrip.svg);
|
||||
|
@ -732,9 +725,12 @@ QPushButton:checked:hover
|
|||
|
||||
QComboBox:hover,
|
||||
QAbstractSpinBox:hover,
|
||||
QAbstractSpinBox:focus,
|
||||
QLineEdit:hover,
|
||||
QTextEdit:hover,
|
||||
QTextEdit:focus,
|
||||
QPlainTextEdit:hover,
|
||||
QPlainTextEdit:focus,
|
||||
QAbstractView:hover,
|
||||
QTreeView:hover
|
||||
{
|
||||
|
@ -1423,7 +1419,7 @@ QToolButton
|
|||
margin: 0.23em;
|
||||
padding: 0.23em;
|
||||
padding-right: 1.2em;
|
||||
min-height: 1.3em;
|
||||
min-height: 1em;
|
||||
}
|
||||
|
||||
QToolButton::right-arrow,
|
||||
|
@ -1531,8 +1527,7 @@ QTableView:selected
|
|||
border: 0em solid black;
|
||||
}
|
||||
|
||||
QTableView,
|
||||
QHeaderView
|
||||
QTableView
|
||||
{
|
||||
border-radius: 0em;
|
||||
}
|
||||
|
@ -1578,8 +1573,10 @@ QHeaderView
|
|||
QHeaderView::section
|
||||
{
|
||||
background-color: #31363b;
|
||||
border: 0.04em solid #76797c;
|
||||
color: #eff0f1;
|
||||
padding: 0.23em;
|
||||
padding-top: 0.3em;
|
||||
border-radius: 0em;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -1625,6 +1622,9 @@ QHeaderView::section::vertical::only-one:hover
|
|||
QHeaderView::down-arrow
|
||||
{
|
||||
image: url(:/dark/down_arrow.svg);
|
||||
subcontrol-origin: margin;
|
||||
subcontrol-position: top center;
|
||||
padding-top: 0.2em;
|
||||
width: 0.8em;
|
||||
height: 0.5em;
|
||||
}
|
||||
|
@ -1632,18 +1632,32 @@ QHeaderView::down-arrow
|
|||
QHeaderView::up-arrow
|
||||
{
|
||||
image: url(:/dark/up_arrow.svg);
|
||||
subcontrol-origin: margin;
|
||||
subcontrol-position: top center;
|
||||
padding-top: 0.2em;
|
||||
width: 0.8em;
|
||||
height: 0.5em;
|
||||
}
|
||||
|
||||
QTableCornerButton::section
|
||||
QTableView QTableCornerButton::section
|
||||
{
|
||||
background-color: #31363b;
|
||||
border: 0.09em transparent #76797c;
|
||||
border: 0.04em transparent #76797c;
|
||||
border-radius: 0em;
|
||||
}
|
||||
|
||||
QTableCornerButton:hover
|
||||
{
|
||||
border: 0.04em transparent #76797c;
|
||||
}
|
||||
|
||||
/* No hover event */
|
||||
QTableView QTableCornerButton::section:pressed
|
||||
{
|
||||
border: 0.04em solid #3daee9;
|
||||
border-radius: 0em;
|
||||
}
|
||||
|
||||
/* TODO(ahuszagh) Need the icon size. */
|
||||
QToolBox
|
||||
{
|
||||
padding: 0.23em;
|
||||
|
|