Opened 11 years ago
Closed 11 years ago
#347 closed task (fixed)
do we need colored buttons?
Reported by: | epruesse | Owned by: | devel |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | global | Version: | SVN |
Keywords: | Cc: |
Description
The Motif wrapper allows giving colors to buttons. Do we need this really? Here's where it is used:
./PARSIMONY/PARS_main.cxx: awm->create_button(0, AWAR_PARSIMONY, 0, "+"); ./PARSIMONY/PARS_main.cxx: awm->create_button(0, AWAR_BEST_PARSIMONY, 0, "+"); ./RNA3D/RNA3D_Interface.cxx: aws->create_button(0, "1C2W: 7.5 A^ Mueller et al. J.Mol.Biol.(2000) 298, 35-59.", 0, "white"); ./MERGE/MG_main.cxx: awm->at("db1"); awm->create_button(0, AWAR_DB_SRC"/name", 0, "+"); ./MERGE/MG_main.cxx: awm->at("db2"); awm->create_button(0, AWAR_DB_DST"/name", 0, "+"); ./MERGE/MG_names.cxx: aws->create_button("MATCH", AWAR_ADDID_MATCH, 0, "+"); ./MERGE/MG_names.cxx: aws->create_button("STATUS", AWAR_RENAME_STATUS, 0, "+"); ./NTREE/NT_ins_col.cxx: aws->create_button(0, AWAR_INSDEL_AFFECTED, 0, "+"); ./NTREE/ad_trees.cxx: aws->create_button(0, AWAR_TREE_NAME, 0, "+"); ./NTREE/NT_branchAnalysis.cxx: aws->create_button(0, ntw->user_awar, 0, "+"); ./EDIT4/ED4_root.cxx: awmm->at("ecoliTxt"); awmm->create_button(0, ED4_AWAR_NDS_ECOLI_NAME, 0, "+"); ./SL/DB_UI/ui_species.cxx: aws->create_button(0, AWAR_NN_SELECTED_HIT_COUNT, 0, "+"); ./SL/DB_QUERY/db_query.cxx: aws->create_button(0, query->awar_count, 0, "+");
Attachments (1)
Change History (10)
comment:1 Changed 11 years ago by westram
comment:2 follow-up: ↓ 4 Changed 11 years ago by epruesse
How about always showing that a "label" (as created by create_button w/o cb) is backed by an AWAR? E.g. by putting a box around them?
I could of course implement the color thing, it's just that "+" isn't really a color. My guess is that it means "a bit lighter than before", but I'm not sure.
comment:3 Changed 11 years ago by epruesse
example for frame in r10605
Changed 11 years ago by epruesse
comment:4 in reply to: ↑ 2 ; follow-up: ↓ 5 Changed 11 years ago by westram
Replying to epruesse:
How about always showing that a "label" (as created by create_button w/o cb) is backed by an AWAR? E.g. by putting a box around them?
Would be ok for me - but not in all cases:
If you look at NTREE/Sequence/InsertDelete/usingSAI there are two kinds of AWAR driven buttons/labels:
- one containing 'selected ranges' or 'selected columns', which is acting as part of the explaining text
- another showing the number of ranges/columns currently selected (this one should be highlighted by some means)
I could of course implement the color thing, it's just that "+" isn't really a color. My guess is that it means "a bit lighter than before", but I'm not sure.
It means "a bit lighter than the background color" (setting the background color is completely ignored in gtk version atm).
comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 11 years ago by epruesse
Replying to westram:
Would be ok for me - but not in all cases:
True. I noticed the "ECOLI" in the editor is an AWAR, too. Might be a useful feature for DEBUG mode though.
It means "a bit lighter than the background color" (setting the background color is completely ignored in gtk version atm).
GTK suggests to mess as little as possible with the theme as this should be configured by /OS. Since I doubt we want ARB to be one of those Apps coming with a completely custom theme, I'd stick to that. Also, GTK3 has lots of changes in this regard (CSS theming for the application) so I'm thinking that we should limit the customizations in order to make GTK3 support simpler.
Maybe interpreting the "+" color as "make a frame around it" would work for the time being?
comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 11 years ago by westram
Replying to epruesse:
It means "a bit lighter than the background color" (setting the background color is completely ignored in gtk version atm).
GTK suggests to mess as little as possible with the theme as this should be configured by /OS. Since I doubt we want ARB to be one of those Apps coming with a completely custom theme, I'd stick to that.
ack
Maybe interpreting the "+" color as "make a frame around it" would work for the time being?
I'd use a bool highlight parameter (either in create_label or some wrapper).
Did you see that the function was already called create_label in ancient times?
comment:7 in reply to: ↑ 6 ; follow-up: ↓ 8 Changed 11 years ago by epruesse
Replying to westram:
Replying to epruesse:
It means "a bit lighter than the background color" (setting the background color is completely ignored in gtk version atm).
GTK suggests to mess as little as possible with the theme as this should be configured by /OS. Since I doubt we want ARB to be one of those Apps coming with a completely custom theme, I'd stick to that.
ack
Maybe interpreting the "+" color as "make a frame around it" would work for the time being?
I'd use a bool highlight parameter (either in create_label or some wrapper).
I'm trying not to mess with the interface too much for now. The "+" is already there, so I'd just mark it with @@@MERGE or create a ticket to refactor it post-merge?
Did you see that the function was already called create_label in ancient times?
Nope, didn't check. Funny, though.
comment:8 in reply to: ↑ 7 Changed 11 years ago by westram
Replying to epruesse:
Maybe interpreting the "+" color as "make a frame around it" would work for the time being?
I'd use a bool highlight parameter (either in create_label or some wrapper).
I'm trying not to mess with the interface too much for now. The "+" is already there, so I'd just mark it with @@@MERGE or create a ticket to refactor it post-merge?
mark with @@@MERGE is fine
Did you see that the function was already called create_label in ancient times?
Nope, didn't check. Funny, though.
One of the first refactoring tools mentions it.
comment:9 Changed 11 years ago by epruesse
- Resolution set to fixed
- Status changed from new to closed
fixed by r10614
Another place where colored buttons are used, is color-config (just to be complete).
As far as i can see, the buttons listed above are all used for displaying some status or similar, so i would say
but
Proposed steps (in trunk):