59 QDialogButtonBox.StandardButton.Ok) |
59 QDialogButtonBox.StandardButton.Ok) |
60 |
60 |
61 self.__initializeDefaults() |
61 self.__initializeDefaults() |
62 |
62 |
63 self.sampleText = self.tr( |
63 self.sampleText = self.tr( |
64 '''<?xml version="1.0" encoding="utf-8"?>''' |
64 '''<!DOCTYPE html''' |
65 '''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"''' |
|
66 '''"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">''' |
|
67 '''<html><head>''' |
65 '''<html><head>''' |
68 '''<title></title>''' |
66 '''<title></title>''' |
69 '''</head>''' |
67 '''</head>''' |
70 '''<body style="background-color:{BodyBgColor};''' |
68 '''<body style="background-color:{BodyBgColor};''' |
71 '''color:{BodyColor}">''' |
69 '''color:{BodyColor}">''' |
393 @param colorKey key of the color to select (string) |
391 @param colorKey key of the color to select (string) |
394 """ |
392 """ |
395 color = QColorDialog.getColor(QColor(self.colors[colorKey])) |
393 color = QColorDialog.getColor(QColor(self.colors[colorKey])) |
396 if color.isValid(): |
394 if color.isValid(): |
397 self.colors[colorKey] = color.name() |
395 self.colors[colorKey] = color.name() |
398 self.sample.setHtml(self.sampleText.format(self.colors)) |
396 self.sample.setHtml(self.sampleText.format(**self.colors)) |
399 |
397 |
400 @pyqtSlot() |
398 @pyqtSlot() |
401 def on_bodyFgButton_clicked(self): |
399 def on_bodyFgButton_clicked(self): |
402 """ |
400 """ |
403 Private slot to select the body foreground color. |
401 Private slot to select the body foreground color. |