Grammalecte  Check-in [0a9f3d6290]

Overview
Comment:[lo] gc options: use tabs (draft)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | lo
Files: files | file ages | folders
SHA3-256: 0a9f3d62903e1a2f94f4546011b499b22885f6e1f0a8ee920666970d4c08ef2c
User & Date: olr on 2019-07-18 08:01:32
Other Links: manifest | tags
Context
2019-07-18
11:10
[fr] ajustements check-in: 302fbdee5f user: olr tags: trunk, fr
08:01
[lo] gc options: use tabs (draft) check-in: 0a9f3d6290 user: olr tags: trunk, lo
2019-07-17
18:16
[fr] ajustements check-in: a59255145c user: olr tags: trunk, fr
Changes

Modified gc_core/py/oxt/Options.py from [1edac42d1a] to [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)