summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2012-10-03 13:06:22 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-03 17:30:18 +0100
commit9c7189d74c9bc49c6670a645e0afee8623a089b5 (patch)
tree1d889be7503270435e45da547ae34aefed5681dd /bitbake
parent93fdfafbfc74a4096a2a5676f28d67ec82c70ba5 (diff)
downloadpoky-9c7189d74c9bc49c6670a645e0afee8623a089b5.tar.gz
bitbake: hob/settings: alignment and spacing fixes on "Shared state" tab
-alignment and separation on vertical and horizontal axis -change controls width [YOCTO #3188] (Bitbake rev: a84c466eae7c2616c041faf930163f23834f0685) Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py72
1 files changed, 43 insertions, 29 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index c7a50ba415..ccd9f39a00 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -112,17 +112,18 @@ class SettingsUIHelper():
112 hbox = gtk.HBox(False, 12) 112 hbox = gtk.HBox(False, 12)
113 entry = gtk.Entry() 113 entry = gtk.Entry()
114 entry.set_text(content) 114 entry.set_text(content)
115 entry.set_size_request(350,30)
115 116
116 if need_button: 117 if need_button:
117 table = gtk.Table(1, 10, True) 118 table = gtk.Table(1, 10, False)
118 hbox.pack_start(table, expand=True, fill=True) 119 hbox.pack_start(table, expand=True, fill=True)
119 table.attach(entry, 0, 9, 0, 1) 120 table.attach(entry, 0, 9, 0, 1, xoptions=gtk.SHRINK)
120 image = gtk.Image() 121 image = gtk.Image()
121 image.set_from_stock(gtk.STOCK_OPEN,gtk.ICON_SIZE_BUTTON) 122 image.set_from_stock(gtk.STOCK_OPEN,gtk.ICON_SIZE_BUTTON)
122 open_button = gtk.Button() 123 open_button = gtk.Button()
123 open_button.set_image(image) 124 open_button.set_image(image)
124 open_button.connect("clicked", self.entry_widget_select_path_cb, parent, entry) 125 open_button.connect("clicked", self.entry_widget_select_path_cb, parent, entry)
125 table.attach(open_button, 9, 10, 0, 1) 126 table.attach(open_button, 9, 10, 0, 1, xoptions=gtk.SHRINK)
126 else: 127 else:
127 hbox.pack_start(entry, expand=True, fill=True) 128 hbox.pack_start(entry, expand=True, fill=True)
128 129
@@ -134,19 +135,29 @@ class SettingsUIHelper():
134 return hbox, entry 135 return hbox, entry
135 136
136 def gen_mirror_entry_widget(self, content, index, match_content=""): 137 def gen_mirror_entry_widget(self, content, index, match_content=""):
137 hbox = gtk.HBox(False, 12) 138 hbox = gtk.HBox(False)
138 entry = gtk.Entry() 139 entry = gtk.Entry()
139 content = content[:-2] 140 content = content[:-2]
140 entry.set_text(content) 141 entry.set_text(content)
142 entry.set_size_request(350,30)
143
141 entry_match = gtk.Entry() 144 entry_match = gtk.Entry()
142 entry_match.set_text(match_content) 145 entry_match.set_text(match_content)
146 entry_match.set_size_request(100,30)
143 147
144 table = gtk.Table(2, 6, True) 148 table = gtk.Table(2, 5, False)
149 table.set_row_spacings(12)
150 table.set_col_spacings(6)
145 hbox.pack_start(table, expand=True, fill=True) 151 hbox.pack_start(table, expand=True, fill=True)
152
146 label_configuration = gtk.Label("Configuration") 153 label_configuration = gtk.Label("Configuration")
154 label_configuration.set_alignment(0.0,0.5)
147 label_mirror_url = gtk.Label("Mirror URL") 155 label_mirror_url = gtk.Label("Mirror URL")
156 label_mirror_url.set_alignment(0.0,0.5)
148 label_match = gtk.Label("Match") 157 label_match = gtk.Label("Match")
158 label_match.set_alignment(0.0,0.5)
149 label_replace_with = gtk.Label("Replace with") 159 label_replace_with = gtk.Label("Replace with")
160 label_replace_with.set_alignment(0.0,0.5)
150 161
151 combo = gtk.combo_box_new_text() 162 combo = gtk.combo_box_new_text()
152 combo.append_text("Standard") 163 combo.append_text("Standard")
@@ -156,29 +167,31 @@ class SettingsUIHelper():
156 else: 167 else:
157 combo.set_active(1) 168 combo.set_active(1)
158 combo.connect("changed", self.on_combo_changed, index) 169 combo.connect("changed", self.on_combo_changed, index)
170 combo.set_size_request(100,30)
159 171
160 delete_button = HobAltButton("Delete") 172 delete_button = HobAltButton("Delete")
161 delete_button.connect("clicked", self.delete_cb, index, entry) 173 delete_button.connect("clicked", self.delete_cb, index, entry)
162 if content == "" and index == 0 and len(self.sstatemirrors_list) == 1: 174 if content == "" and index == 0 and len(self.sstatemirrors_list) == 1:
163 delete_button.set_sensitive(False) 175 delete_button.set_sensitive(False)
176 delete_button.set_size_request(100, 30)
164 177
165 entry_match.connect("changed", self.insert_entry_match_cb, index) 178 entry_match.connect("changed", self.insert_entry_match_cb, index)
166 entry.connect("changed", self.insert_entry_cb, index, delete_button) 179 entry.connect("changed", self.insert_entry_cb, index, delete_button)
167 180
168 if match_content == "": 181 if match_content == "":
169 table.attach(label_configuration, 0, 1, 0, 1) 182 table.attach(label_configuration, 1, 2, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
170 table.attach(label_mirror_url, 1, 2, 0, 1) 183 table.attach(label_mirror_url, 2, 3, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
171 table.attach(combo, 0, 1, 1, 2) 184 table.attach(combo, 1, 2, 1, 2, xoptions=gtk.SHRINK)
172 table.attach(entry, 1, 5, 1, 2) 185 table.attach(entry, 2, 3, 1, 2, xoptions=gtk.SHRINK)
173 table.attach(delete_button, 5, 6, 1, 2) 186 table.attach(delete_button, 3, 4, 1, 2, xoptions=gtk.SHRINK)
174 else: 187 else:
175 table.attach(label_configuration, 0, 1, 0, 1) 188 table.attach(label_configuration, 1, 2, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
176 table.attach(label_match, 1, 2, 0, 1) 189 table.attach(label_match, 2, 3, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
177 table.attach(label_replace_with, 2, 3, 0, 1) 190 table.attach(label_replace_with, 3, 4, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
178 table.attach(combo, 0, 1, 1, 2) 191 table.attach(combo, 1, 2, 1, 2, xoptions=gtk.SHRINK)
179 table.attach(entry_match, 1, 2, 1, 2) 192 table.attach(entry_match, 2, 3, 1, 2, xoptions=gtk.SHRINK)
180 table.attach(entry, 2, 5, 1, 2) 193 table.attach(entry, 3, 4, 1, 2, xoptions=gtk.SHRINK)
181 table.attach(delete_button, 5, 6, 1, 2) 194 table.attach(delete_button, 4, 5, 1, 2, xoptions=gtk.SHRINK)
182 195
183 hbox.show_all() 196 hbox.show_all()
184 return hbox 197 return hbox
@@ -521,19 +534,19 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
521 return advanced_vbox 534 return advanced_vbox
522 535
523 def create_shared_state_page(self): 536 def create_shared_state_page(self):
524 advanced_vbox = gtk.VBox(False, 6) 537 advanced_vbox = gtk.VBox(False)
525 advanced_vbox.set_border_width(6) 538 advanced_vbox.set_border_width(12)
526 539
527 sub_vbox = gtk.VBox(False, 6) 540 sub_vbox = gtk.VBox(False)
528 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 541 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False, padding=24)
529 content = "<span weight=\"bold\">Shared state directory</span>" 542 content = "<span>Shared state directory</span>"
530 tooltip = "Select a folder that caches your prebuilt results" 543 tooltip = "Select a folder that caches your prebuilt results"
531 label = self.gen_label_info_widget(content, tooltip) 544 label = self.gen_label_info_widget(content, tooltip)
532 sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self) 545 sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self)
533 sub_vbox.pack_start(label, expand=False, fill=False) 546 sub_vbox.pack_start(label, expand=False, fill=False)
534 sub_vbox.pack_start(sstatedir_widget, expand=False, fill=False) 547 sub_vbox.pack_start(sstatedir_widget, expand=False, fill=False, padding=12)
535 548
536 sub_vbox = gtk.VBox(False, 6) 549 sub_vbox = gtk.VBox(False)
537 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 550 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
538 content = "<span weight=\"bold\">Shared state mirrors</span>" 551 content = "<span weight=\"bold\">Shared state mirrors</span>"
539 tooltip = "URLs pointing to pre-built mirrors that will speed your build. " 552 tooltip = "URLs pointing to pre-built mirrors that will speed your build. "
@@ -575,15 +588,16 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
575 sstatemirror_widget = self.gen_mirror_entry_widget(mirror[1], index) 588 sstatemirror_widget = self.gen_mirror_entry_widget(mirror[1], index)
576 else: 589 else:
577 sstatemirror_widget = self.gen_mirror_entry_widget(mirror[1], index, mirror[2]) 590 sstatemirror_widget = self.gen_mirror_entry_widget(mirror[1], index, mirror[2])
578 sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False) 591 sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False, padding=9)
579 index += 1 592 index += 1
580 593
581 sub_vbox = gtk.VBox(False, 6) 594 table = gtk.Table(1, 1, False)
582 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 595 table.set_col_spacings(6)
583 add_mirror_button = HobAltButton("Add another mirror") 596 add_mirror_button = HobAltButton("Add another mirror")
584 add_mirror_button.set_size_request(100, -1)
585 add_mirror_button.connect("clicked", self.add_mirror) 597 add_mirror_button.connect("clicked", self.add_mirror)
586 sub_vbox.pack_start(add_mirror_button, expand=False, fill=False) 598 add_mirror_button.set_size_request(150,30)
599 table.attach(add_mirror_button, 1, 2, 0, 1, xoptions=gtk.SHRINK)
600 advanced_vbox.pack_start(table, expand=False, fill=False, padding=9)
587 601
588 return advanced_vbox 602 return advanced_vbox
589 603