From: Joshua Lock <josh@linux.intel.com>
To: "Xu, Dongxiao" <dongxiao.xu@intel.com>
Cc: bitbake-devel@lists.openembedded.org, Giulia Piu <giulia@closertag.com>
Subject: Re: [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling
Date: Fri, 23 Mar 2012 18:07:09 -0700 [thread overview]
Message-ID: <4F6D1E3D.60205@linux.intel.com> (raw)
In-Reply-To: <1332550859.1849.16.camel@dongxiao-osel>
On 23/03/12 18:00, Xu, Dongxiao wrote:
> On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote:
>> The design calls for primary buttons which are orange and large and
>> secondary buttons which are subtle with pale blue text. This is so that the
>> user is drawn towards the primary action and their use of the application
>> is more guided.
>>
>> This patch uses HobButton and HobAltButton classes to style all dialogue
>> buttons accordingly.
>>
>> Fixes [YOCTO #2125]
>>
>> Signed-off-by: Joshua Lock<josh@linux.intel.com>
>> ---
>> lib/bb/ui/crumbs/builder.py | 106 +++++++++++++++++++++++++++----------------
>> lib/bb/ui/crumbs/hig.py | 34 ++++++++------
>> 2 files changed, 87 insertions(+), 53 deletions(-)
>>
>> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
>> index 4eb374c..e27a239 100755
>> --- a/lib/bb/ui/crumbs/builder.py
>> +++ b/lib/bb/ui/crumbs/builder.py
>> @@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage
>> from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
>> from bb.ui.crumbs.builddetailspage import BuildDetailsPage
>> from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
>> -from bb.ui.crumbs.hobwidget import hwc
>> +from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton
>> from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
>> AdvancedSettingDialog, LayerSelectionDialog, \
>> DeployImageDialog
>> @@ -435,7 +435,8 @@ class Builder(gtk.Window):
>> lbl = "<b>Error</b>\n"
>> lbl = lbl + "%s\n\n" % msg
>> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
>> + button = dialog.add_button("Close", gtk.RESPONSE_OK)
>> + HobButton.style_button(button)
>> response = dialog.run()
>> dialog.destroy()
>> self.handler.clear_busy()
>> @@ -608,8 +609,10 @@ class Builder(gtk.Window):
>> def destroy_window_cb(self, widget, event):
>> lbl = "<b>Do you really want to exit the Hob image creator?</b>"
>> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
>> - dialog.add_button("Keep using Hob", gtk.RESPONSE_NO)
>> - dialog.add_button("Exit Hob", gtk.RESPONSE_YES)
>> + button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
>> + HobAltButton.style_button(button)
>> + button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES)
>> + HobButton.style_button(button)
>> dialog.set_default_response(gtk.RESPONSE_YES)
>> response = dialog.run()
>> dialog.destroy()
>> @@ -625,7 +628,8 @@ class Builder(gtk.Window):
>> lbl = "<b>No selections made</b>\nYou have not made any selections"
>> lbl = lbl + " so there isn't anything to bake at this time."
>> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
>> + button = dialog.add_button("Close", gtk.RESPONSE_OK)
>> + HobButton.style_button(button)
>> dialog.run()
>> dialog.destroy()
>> return
>> @@ -637,7 +641,8 @@ class Builder(gtk.Window):
>> lbl = "<b>No selections made</b>\nYou have not made any selections"
>> lbl = lbl + " so there isn't anything to bake at this time."
>> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
>> + button = dialog.add_button("Close", gtk.RESPONSE_OK)
>> + HobButton.style_button(button)
>> dialog.run()
>> dialog.destroy()
>> return
>> @@ -652,7 +657,8 @@ class Builder(gtk.Window):
>> lbl = "<b>No selections made</b>\nYou have not made any selections"
>> lbl = lbl + " so there isn't anything to bake at this time."
>> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
>> + button = dialog.add_button("Close", gtk.RESPONSE_OK)
>> + HobButton.style_button(button)
>> dialog.run()
>> dialog.destroy()
>> return
>> @@ -672,8 +678,9 @@ class Builder(gtk.Window):
>> parent = self,
>> flags = gtk.DIALOG_MODAL
>> | gtk.DIALOG_DESTROY_WITH_PARENT
>> - | gtk.DIALOG_NO_SEPARATOR,
>> - buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES))
>> + | gtk.DIALOG_NO_SEPARATOR)
>> + button = dialog.add_button("Close", gtk.RESPONSE_YES)
>> + HobButton.style_button(button)
>> response = dialog.run()
>> if response == gtk.RESPONSE_YES:
>> self.configuration.layers = dialog.layers
>
> As my previous point, I still strongly suggest we keep the "cancel"
> button in the layer selection and advanced setting dialog to avoid
> user's wrong operation. Need Belen or Giulia's input.
They both responded via Bugzilla, I mistakenly thought you were on CC -
apologies.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=2083
Cheers,
Joshua
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-03-24 1:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock
2012-03-24 0:22 ` [PATCH 1/9] lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue Joshua Lock
2012-03-24 0:26 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 2/9] lib/bb/ui/crumbs/hobwidget: HobAltButton different visual when insensitive Joshua Lock
2012-03-24 0:27 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 3/9] lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per design Joshua Lock
2012-03-24 0:32 ` Xu, Dongxiao
2012-03-24 0:44 ` Joshua Lock
2012-03-24 0:23 ` [PATCH 4/9] lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button Joshua Lock
2012-03-24 0:32 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 5/9] lib/bb/ui/crumbs/hobwidget: convert button styling logic to static methods Joshua Lock
2012-03-24 1:01 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 6/9] lib/bb/ui/crumbs/persistenttooltip: layout tweaks Joshua Lock
2012-03-24 1:03 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 7/9] lib/bb/ui/crumbs/persistenttooltip: ensure a reasonable minimum size Joshua Lock
2012-03-24 1:03 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 8/9] lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by information Joshua Lock
2012-03-24 1:04 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling Joshua Lock
2012-03-24 1:00 ` Xu, Dongxiao
2012-03-24 1:07 ` Joshua Lock [this message]
2012-03-24 1:19 ` Xu, Dongxiao
2012-03-26 4:07 ` Wang, Shane
2012-03-26 6:10 ` Xu, Dongxiao
2012-03-26 14:58 ` Barros Pena, Belen
[not found] ` <40776A41FC278F40B59438AD47D147A90FCFE9B5@SHSMSX102.ccr.corp.intel.com>
2012-03-27 1:04 ` FW: " Xu, Dongxiao
2012-03-25 11:12 ` [PATCH 0/9] Hob visual refinements to more closely match design Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F6D1E3D.60205@linux.intel.com \
--to=josh@linux.intel.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=dongxiao.xu@intel.com \
--cc=giulia@closertag.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.