Give the left calculator side of the UI a black bg style for contrast, separation from the answer tape, and better match original mockups from Eben.
Gary Martin
11 years ago
154 | 154 | |
155 | 155 | # Big - Table, 16 rows, 10 columns, homogeneously divided |
156 | 156 | self.grid = gtk.Table(16, 11, True) |
157 | self.grid.set_border_width(6) | |
158 | self.grid.set_row_spacings(6) | |
159 | self.grid.set_col_spacings(6) | |
157 | self.grid.set_border_width(0) | |
158 | self.grid.set_row_spacings(0) | |
159 | self.grid.set_col_spacings(0) | |
160 | 160 | |
161 | 161 | # Left part: container and input |
162 | 162 | hc1 = gtk.HBox(False, 10) |
163 | eb = gtk.EventBox() | |
164 | eb.add(hc1) | |
165 | eb.modify_bg(gtk.STATE_NORMAL, self.col_black) | |
166 | eb.set_border_width(12) | |
167 | eb2 = gtk.EventBox() | |
168 | eb2.add(eb) | |
169 | eb2.modify_bg(gtk.STATE_NORMAL, self.col_black) | |
163 | 170 | label1 = gtk.Label(_('Label:')) |
171 | label1.modify_fg(gtk.STATE_NORMAL, self.col_white) | |
172 | label1.set_alignment(1, 0.5) | |
164 | 173 | hc1.add(label1) |
165 | 174 | self.label_entry = gtk.Entry() |
175 | self.label_entry.modify_bg(gtk.STATE_INSENSITIVE, self.col_black) | |
166 | 176 | hc1.add(self.label_entry) |
167 | self.grid.attach(hc1, 0, 6, 0, 1) | |
177 | self.grid.attach(eb2, 0, 6, 0, 2) | |
168 | 178 | |
169 | 179 | self.text_entry = gtk.Entry() |
170 | 180 | self.text_entry.set_size_request(400, 100) |
171 | 181 | self.text_entry.connect('key_press_event', self._parent.ignore_key_cb) |
172 | 182 | self.text_entry.modify_font(self.input_font) |
173 | self.grid.attach(self.text_entry, 0, 6, 1, 5) | |
183 | self.text_entry.modify_bg(gtk.STATE_INSENSITIVE, self.col_black) | |
184 | eb = gtk.EventBox() | |
185 | eb.add(self.text_entry) | |
186 | eb.modify_bg(gtk.STATE_NORMAL, self.col_black) | |
187 | eb.set_border_width(12) | |
188 | eb2 = gtk.EventBox() | |
189 | eb2.add(eb) | |
190 | eb2.modify_bg(gtk.STATE_NORMAL, self.col_black) | |
191 | self.grid.attach(eb2, 0, 6, 2, 5) | |
174 | 192 | |
175 | 193 | # Left part: buttons |
176 | 194 | self.pad = gtk.Table(4, 6, True) |
177 | self.pad.set_row_spacings(6) | |
178 | self.pad.set_col_spacings(6) | |
195 | self.pad.set_row_spacings(12) | |
196 | self.pad.set_col_spacings(12) | |
197 | self.pad.set_border_width(12) | |
179 | 198 | self.create_button_data() |
180 | 199 | self.buttons = {} |
181 | 200 | for x, y, w, cap, bgcol, cb in self.button_data: |
183 | 202 | self.buttons[cap] = button |
184 | 203 | self.pad.attach(button, x, x+w, y, y+1) |
185 | 204 | |
186 | # Not for now... | |
187 | # self.pad_ebox = gtk.EventBox() | |
188 | # self.pad_ebox.add(self.pad) | |
189 | # self.pad_ebox.modify_bg(gtk.STATE_NORMAL, self.col_black) | |
190 | ||
191 | self.grid.attach(self.pad, 0, 6, 5, 16) | |
205 | eb = gtk.EventBox() | |
206 | eb.add(self.pad) | |
207 | eb.modify_bg(gtk.STATE_NORMAL, self.col_black) | |
208 | self.grid.attach(eb, 0, 6, 5, 16) | |
192 | 209 | |
193 | 210 | # Right part: container and equation button |
194 | 211 | hc2 = gtk.HBox() |