@@ -77,10 +77,11 @@ self.xDialog.Title = ui.get('title') ## fonts xFD1 = uno.createUnoStruct("com.sun.star.awt.FontDescriptor") xFD1.Height = 12 + xFD1.Weight = uno.getConstantByName("com.sun.star.awt.FontWeight.BOLD") xFD1.Name = "Verdana" xFD2 = uno.createUnoStruct("com.sun.star.awt.FontDescriptor") xFD2.Height = 10 xFD2.Weight = uno.getConstantByName("com.sun.star.awt.FontWeight.BOLD") @@ -96,21 +97,21 @@ nRightLimit1 = 150 nRightLimit2 = 300 nWidth = 140 nWidthHalf = (nWidth // 2) - 10 nHeight = 10 - nColor = 0xAA2200 + nGroupColor = 0xBB5555 # close or apply self.bClose = False # group box // surnumerary spaces y = 10 nPosRes = nRightLimit1 - 20 self.ssp = self._addWidget('ssp', 'CheckBox', x, y+2, nWidth, nHeight, Label = ui.get('ssp'), FontDescriptor = xFD1, \ - FontRelief = 1, TextColor = nColor, State = True) - self._addWidget("section1", 'FixedLine', nRightLimit1-(nWidth//5), y, nWidth//5, nHeight) + TextColor = nGroupColor, State = True) + self._addWidget("section1", 'FixedLine', nRightLimit1-(nWidth//6), y, nWidth//6, nHeight) self.ssp1 = self._addWidget('ssp1', 'CheckBox', x, y+15, nWidth, nHeight, Label = ui.get('ssp1'), State = True) self.ssp2 = self._addWidget('ssp2', 'CheckBox', x, y+25, nWidth, nHeight, Label = ui.get('ssp2'), State = True) self.ssp3 = self._addWidget('ssp3', 'CheckBox', x, y+35, nWidth, nHeight, Label = ui.get('ssp3'), State = True) self.ssp4 = self._addWidget('ssp4', 'CheckBox', x, y+45, nWidth, nHeight, Label = ui.get('ssp4'), State = True) self.ssp5 = self._addWidget('ssp5', 'CheckBox', x, y+55, nWidth, nHeight, Label = ui.get('ssp5'), State = True) @@ -125,22 +126,22 @@ self.ssp7_res = self._addWidget('ssp7_res', 'FixedText', nPosRes, y+75, 20, nHeight, Label = "", Align = 2) # group box // missing spaces y = y + 85 self.space = self._addWidget('space', 'CheckBox', x, y+2, nWidth, nHeight, Label = ui.get('space'), FontDescriptor = xFD1, \ - FontRelief = 1, TextColor = nColor, State = True) - self._addWidget("section2", 'FixedLine', nRightLimit1-(nWidth//3), y, nWidth//3, nHeight) + TextColor = nGroupColor, State = True) + self._addWidget("section2", 'FixedLine', nRightLimit1-(nWidth//4), y, nWidth//4, nHeight) self.space1 = self._addWidget('space1', 'CheckBox', x, y+15, nWidth, nHeight, Label = ui.get('space1'), State = True) self.space2 = self._addWidget('space2', 'CheckBox', x, y+25, nWidth, nHeight, Label = ui.get('space2'), State = True) self.space1_res = self._addWidget('space1_res', 'FixedText', nPosRes, y+15, 20, nHeight, Label = "", Align = 2) self.space2_res = self._addWidget('space2_res', 'FixedText', nPosRes, y+25, 20, nHeight, Label = "", Align = 2) # group box // non-breaking spaces y = y + 35 self.nbsp = self._addWidget('nbsp', 'CheckBox', x, y+2, nWidth, nHeight, Label = ui.get('nbsp'), FontDescriptor = xFD1, \ - FontRelief = 1, TextColor = nColor, State = True) - self._addWidget("section3", 'FixedLine', nRightLimit1-(nWidth//3), y, nWidth//3, nHeight) + TextColor = nGroupColor, State = True) + self._addWidget("section3", 'FixedLine', nRightLimit1-(nWidth//4), y, nWidth//4, nHeight) self.nbsp1 = self._addWidget('nbsp1', 'CheckBox', x, y+15, 85, nHeight, Label = ui.get('nbsp1'), State = True) self.nbsp2 = self._addWidget('nbsp2', 'CheckBox', x, y+25, 85, nHeight, Label = ui.get('nbsp2'), State = True) self.nbsp3 = self._addWidget('nbsp3', 'CheckBox', x, y+35, nWidth, nHeight, Label = ui.get('nbsp3'), State = True) self.nbsp4 = self._addWidget('nbsp4', 'CheckBox', x, y+45, 85, nHeight, Label = ui.get('nbsp4'), State = True) self.nbsp5 = self._addWidget('nbsp5', 'CheckBox', x, y+55, 85, nHeight, Label = ui.get('nbsp5'), State = True) @@ -156,12 +157,12 @@ self.nbsp6_res = self._addWidget('nbsp6_res', 'FixedText', nPosRes, y+65, 20, nHeight, Label = "", Align = 2) # group box // deletion y = y + 75 self.delete = self._addWidget('delete', 'CheckBox', x, y+2, nWidth, nHeight, Label = ui.get('delete'), FontDescriptor = xFD1, \ - FontRelief = 1, TextColor = nColor, State = True) - self._addWidget("section7", 'FixedLine', nRightLimit1-(nWidth//2), y, nWidth//2, nHeight) + TextColor = nGroupColor, State = True) + self._addWidget("section7", 'FixedLine', nRightLimit1-(nWidth//3), y, nWidth//3, nHeight) self.delete1 = self._addWidget('delete1', 'CheckBox', x, y+15, nWidth, nHeight, Label = ui.get('delete1'), State = True) self.delete2 = self._addWidget('delete2', 'CheckBox', x, y+25, nWidth, nHeight, Label = ui.get('delete2'), State = True) self.delete2a = self._addWidget('delete2a', 'RadioButton', x+10, y+35, 50, nHeight, Label = ui.get('delete2a')) self.delete2b = self._addWidget('delete2b', 'RadioButton', x+60, y+35, 60, nHeight, Label = ui.get('delete2b'), State = True) self.delete2c = self._addWidget('delete2c', 'RadioButton', x+120, y+35, 40, nHeight, Label = ui.get('delete2c'), \ @@ -171,12 +172,12 @@ # group box // typographical marks y = 10 nPosRes = nRightLimit2 - 20 self.typo = self._addWidget('typo', 'CheckBox', x2, y+2, nWidth, nHeight, Label = ui.get('typo'), FontDescriptor = xFD1, \ - FontRelief = 1, TextColor = nColor, State = True) - self._addWidget("section4", 'FixedLine', nRightLimit2-(nWidth//5), y, nWidth//5, nHeight) + TextColor = nGroupColor, State = True) + self._addWidget("section4", 'FixedLine', nRightLimit2-(nWidth//6), y, nWidth//6, nHeight) self.typo1 = self._addWidget('typo1', 'CheckBox', x2, y+15, nWidth, nHeight, Label = ui.get('typo1'), State = True) self.typo2 = self._addWidget('typo2', 'CheckBox', x2, y+25, nWidth, nHeight, Label = ui.get('typo2'), State = True) self.typo3 = self._addWidget('typo3', 'CheckBox', x2, y+35, nWidth, nHeight, Label = ui.get('typo3'), State = True) self.typo3a = self._addWidget('typo3a', 'RadioButton', x2+10, y+45, nWidthHalf, nHeight, Label = ui.get('emdash')) self.typo3b = self._addWidget('typo3b', 'RadioButton', x2+70, y+45, nWidthHalf, nHeight, Label = ui.get('endash'), State = True) @@ -207,11 +208,11 @@ self.typo8_res = self._addWidget('typo8_res', 'FixedText', nPosRes, y+105, 20, nHeight, Label = "", Align = 2) # group box // misc. y = y + 125 self.misc = self._addWidget('misc', 'CheckBox', x2, y+2, nWidth, nHeight, Label = ui.get('misc'), FontDescriptor = xFD1, \ - FontRelief = 1, TextColor = nColor, State = True) + TextColor = nGroupColor, State = True) self._addWidget("section5", 'FixedLine', nRightLimit2-(nWidth//2), y, nWidth//2, nHeight) self.misc1 = self._addWidget('misc1', 'CheckBox', x2, y+15, 80, nHeight, Label = ui.get('misc1'), State = True) self.misc1a = self._addWidget('misc1a', 'CheckBox', x2+80, y+15, 30, nHeight, Label = ui.get('misc1a'), State = True) self.misc2 = self._addWidget('misc2', 'CheckBox', x2, y+25, nWidth, nHeight, Label = ui.get('misc2'), State = True) self.misc3 = self._addWidget('misc3', 'CheckBox', x2, y+35, nWidth, nHeight, Label = ui.get('misc3'), State = True) @@ -230,12 +231,12 @@ self.misccustom_res = self._addWidget('misccustom_res', 'FixedText', nPosRes, y+65, 20, nHeight, Label = "", Align = 2) # group box // restructuration y = y + 75 self.struct = self._addWidget('struct', 'CheckBox', x2, y+2, nWidth, nHeight, Label = ui.get('struct'), FontDescriptor = xFD1, \ - FontRelief = 1, TextColor = nColor, HelpText = ui.get('struct_help'), State = False) - self._addWidget("section6", 'FixedLine', nRightLimit2-(nWidth//3), y, nWidth//3, nHeight) + TextColor = nGroupColor, HelpText = ui.get('struct_help'), State = False) + self._addWidget("section6", 'FixedLine', nRightLimit2-(nWidth//4), y, nWidth//4, nHeight) self.struct1 = self._addWidget('struct1', 'CheckBox', x2, y+15, nWidth, nHeight, Label = ui.get('struct1'), State = True, Enabled = False) self.struct2 = self._addWidget('struct2', 'CheckBox', x2, y+25, nWidth, nHeight, Label = ui.get('struct2'), State = True, Enabled = False) self.struct3 = self._addWidget('struct3', 'CheckBox', x2, y+35, nWidth, nHeight, Label = ui.get('struct3'), \ HelpText = ui.get('struct3_help'), State = False, Enabled = False) self.struct1_res = self._addWidget('struct1_res', 'FixedText', nPosRes, y+15, 20, nHeight, Label = "", Align = 2) @@ -257,15 +258,15 @@ # selection only self.bsel = self._addWidget('bsel', 'CheckBox', 170, self.xDialog.Height-15, 90, nHeight, Label = ui.get('bsel')) # buttons self.bdefault = self._addWidget('default', 'Button', 5, y+47, 15, 15, Label = ui.get('default'), \ - HelpText = ui.get('default_help'), FontDescriptor = xFD2, TextColor = 0x444444) + HelpText = ui.get('default_help'), FontDescriptor = xFD2) self.bapply = self._addWidget('apply', 'Button', self.xDialog.Width-55, self.xDialog.Height-19, 50, 15, Label = ui.get('apply'), \ - FontDescriptor = xFD2, TextColor = 0x004400) + FontDescriptor = xFD2, TextColor = 0x55BB55) self.binfo = self._addWidget('info', 'Button', self.xDialog.Width-15, 0, 10, 9, Label = ui.get('info'), \ - HelpText = ui.get('infotitle'), FontDescriptor = xFDsmall, TextColor = 0x444444) + HelpText = ui.get('infotitle'), FontDescriptor = xFDsmall) # lists of checkbox widgets self.dCheckboxWidgets = { "ssp": [self.ssp1, self.ssp2, self.ssp3, self.ssp4, self.ssp5, self.ssp6, self.ssp7], "space": [self.space1, self.space2], @@ -441,15 +442,15 @@ def _setApplyButtonLabel (self): if self.ssp.State or self.space.State or self.nbsp.State or self.delete.State or self.typo.State or self.misc.State or self.struct.State: self.bClose = False self.bapply.Label = ui.get('apply') - self.bapply.TextColor = 0x004400 + self.bapply.TextColor = 0x55BB55 else: self.bClose = True self.bapply.Label = ui.get('close') - self.bapply.TextColor = 0x440000 + self.bapply.TextColor = 0xBB5555 self.xContainer.setVisible(True) def _replaceAll (self, xElem): try: nStartTime = time.perf_counter()