do not pre-select an item in highlight dialog

This commit is contained in:
2021-11-01 19:31:19 +01:00
parent f3f47d0ce7
commit 5b9c64fb86
2 changed files with 10 additions and 36 deletions

View File

@@ -36,41 +36,17 @@ class ColorButton(QWidget):
# grey
self.tr('Light Grey'): 'cccccc',
self.tr('Grey'): '999999',
# self.tr('Hot Pink'): 'ffaebc',
# self.tr('Light Coral'): 'f08080',
# self.tr('Red'): 'cc0000',
# self.tr('Orange'): 'fcaf3e',
# self.tr('Dark Orange'): 'ce5c00',
# self.tr('Yellow'): 'fce94f',
# self.tr('Dark Yellow'): 'c4a000',
# self.tr('Mint'): 'b4f8c8',
# self.tr('Green'): '8ae234',
# self.tr('Dark Green'): '439a06',
# self.tr('Tiffany Blue'): 'a0e7e5',
# self.tr('Blue'): '729fcf',
# self.tr('Dark Blue'): '3465a4',
# self.tr('Purple'): 'ad7fa8',
# self.tr('Dark Purple'): '5c3566',
# self.tr('Brown'): 'e9b96e',
# self.tr('Dark Brown'): 'c17d11',
# self.tr('Grey'): 'd3d7cf',
# self.tr('Dark Grey'): '888a85',
# self.tr('Brewer Light Blue'): 'ece7f2',
# self.tr('Brewer Blue'): 'a6bddb',
# self.tr('Brewer Dark Blue'): '2b8cbe',
# self.tr('Brewer Light Red'): 'fee8c8',
# self.tr('Brewer Red'): 'fdbb84',
# self.tr('Brewer Dark Red'): 'e34a33',
}
self.color_drop_down = QComboBox()
self.layout.addWidget(self.color_drop_down)
self.color_drop_down.currentIndexChanged.connect(self._color_selected)
self.color_drop_down.addItem(QIcon(self._color_pixmap("ffffffff")), self.tr("transparent"), "None")
for color_name in colors.keys():
color_value = colors[color_name]
self.color_drop_down.addItem(QIcon(self._color_pixmap(color_value)), color_name, color_value)
self.color_drop_down.currentIndexChanged.connect(self._color_selected)
if color == color_name or color == color_value:
self.color_drop_down.setCurrentIndex(self.color_drop_down.count() - 1)
self.btn_color_picker = QPushButton(QIcon.fromTheme("color-picker"), self.tr("custom"))
self.layout.addWidget(self.btn_color_picker)