Codebase list sugar-calculate-activity / 01e7539
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
1 changed file(s) with 30 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
154154
155155 # Big - Table, 16 rows, 10 columns, homogeneously divided
156156 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)
160160
161161 # Left part: container and input
162162 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)
163170 label1 = gtk.Label(_('Label:'))
171 label1.modify_fg(gtk.STATE_NORMAL, self.col_white)
172 label1.set_alignment(1, 0.5)
164173 hc1.add(label1)
165174 self.label_entry = gtk.Entry()
175 self.label_entry.modify_bg(gtk.STATE_INSENSITIVE, self.col_black)
166176 hc1.add(self.label_entry)
167 self.grid.attach(hc1, 0, 6, 0, 1)
177 self.grid.attach(eb2, 0, 6, 0, 2)
168178
169179 self.text_entry = gtk.Entry()
170180 self.text_entry.set_size_request(400, 100)
171181 self.text_entry.connect('key_press_event', self._parent.ignore_key_cb)
172182 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)
174192
175193 # Left part: buttons
176194 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)
179198 self.create_button_data()
180199 self.buttons = {}
181200 for x, y, w, cap, bgcol, cb in self.button_data:
183202 self.buttons[cap] = button
184203 self.pad.attach(button, x, x+w, y, y+1)
185204
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)
192209
193210 # Right part: container and equation button
194211 hc2 = gtk.HBox()