Grammalecte  Diff

Differences From Artifact [1edac42d1a]:

To Artifact [3ed542ae4e]:


108
109
110
111
112
113
114
115
116
117
118
119
120

121


122

123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
                    y += 3
                    for lOptLine in lOptions:
                        x = 15
                        y += 10
                        n = len(lOptLine)
                        for sOpt in lOptLine:
                            sLabel, sHelpText = dOptionUI.get(sOpt, "#err")
                            xOpt = self._addWidget(sOpt, 'CheckBox', x, y, nWidth/n, nHeight, Label = sLabel, HelpText = sHelpText)
                            self.lOptionWidgets.append(xOpt)
                            x += nWidth / n
                self.xDialog.Height = y + 40
            else:
                # we can use tabs

                xTabPageContainer = self._addWidget("tabs", "com.sun.star.awt.tab.UnoControlTabPageContainerModel", 10, 10, nWidth, 100)


                xTabPage1 = xTabPageContainer.createTabPage(0);

                xTabPage1.Title = "Page 1"
                xTabPage2 = xTabPageContainer.createTabPage(1);
                xTabPage2.Title = "Page 2"
                xTabPageContainer.insertByIndex(0, xTabPage1);
                xTabPageContainer.insertByIndex(1, xTabPage2);
                self.xDialog.Height = 300

            xWindowSize = helpers.getWindowSize()
            self.xDialog.PositionX = int((xWindowSize.Width / 2) - (self.xDialog.Width / 2))
            self.xDialog.PositionY = int((xWindowSize.Height / 2) - (self.xDialog.Height / 2))

            self._addWidget('default', 'Button', 10, self.xDialog.Height-20, 50, 14, \
                            Label = dUI.get('default', "#err"), FontDescriptor = xFDBut, TextColor = 0x000044)
            self._addWidget('apply', 'Button', self.xDialog.Width-115, self.xDialog.Height-20, 50, 14, \
                            Label = dUI.get('apply', "#err"), FontDescriptor = xFDBut, TextColor = 0x004400)
            self._addWidget('cancel', 'Button', self.xDialog.Width-60, self.xDialog.Height-20, 50, 14,
                            Label = dUI.get('cancel', "#err"), FontDescriptor = xFDBut, TextColor = 0x440000)







|

|



>

>
>
|
>

<

|
|



|
|







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
                    y += 3
                    for lOptLine in lOptions:
                        x = 15
                        y += 10
                        n = len(lOptLine)
                        for sOpt in lOptLine:
                            sLabel, sHelpText = dOptionUI.get(sOpt, "#err")
                            xOpt = self._addWidget(sOpt, 'CheckBox', x, y, nWidth//n, nHeight, Label = sLabel, HelpText = sHelpText)
                            self.lOptionWidgets.append(xOpt)
                            x += nWidth // n
                self.xDialog.Height = y + 40
            else:
                # we can use tabs
                print("1")
                xTabPageContainer = self._addWidget("tabs", "com.sun.star.awt.tab.UnoControlTabPageContainerModel", 10, 10, nWidth, 100)
                xTabPage1 = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.tab.UnoControlTabPageModel', self.ctx)
                xTabPage2 = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.tab.UnoControlTabPageModel', self.ctx)
                #xTabPage1 = xTabPageContainer.createTabPage(1)
                #xTabPage2 = xTabPageContainer.createTabPage(2)
                xTabPage1.Title = "Page 1"

                xTabPage2.Title = "Page 2"
                xTabPageContainer.insertByIndex(0, xTabPage1)
                xTabPageContainer.insertByIndex(1, xTabPage2)
                self.xDialog.Height = 300

            xWindowSize = helpers.getWindowSize()
            self.xDialog.PositionX = int((xWindowSize.Width // 2) - (self.xDialog.Width // 2))
            self.xDialog.PositionY = int((xWindowSize.Height // 2) - (self.xDialog.Height // 2))

            self._addWidget('default', 'Button', 10, self.xDialog.Height-20, 50, 14, \
                            Label = dUI.get('default', "#err"), FontDescriptor = xFDBut, TextColor = 0x000044)
            self._addWidget('apply', 'Button', self.xDialog.Width-115, self.xDialog.Height-20, 50, 14, \
                            Label = dUI.get('apply', "#err"), FontDescriptor = xFDBut, TextColor = 0x004400)
            self._addWidget('cancel', 'Button', self.xDialog.Width-60, self.xDialog.Height-20, 50, 14,
                            Label = dUI.get('cancel', "#err"), FontDescriptor = xFDBut, TextColor = 0x440000)