mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-25 18:01:54 +02:00
When selecting an expression of an assignment and then selecting another
expression, the background of the first expression did not revert to its original color. - gui_style.h (COLOR_CHOICE_SELECTED): made blue a bit lighter, to improve contrast of black foreground text - gui_frame.c (unselect_value): build_assignment uses COLOR_EXPR_PASSIVE for expressions in assignments, so we also have to do the same here. git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5763 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
887643e65a
commit
09186de7a8
19
gui_frame.c
19
gui_frame.c
@ -508,8 +508,19 @@ static void unselect_value(void *data)
|
||||
{
|
||||
struct value *value = data;
|
||||
|
||||
/*
|
||||
* This condition is a little cryptic. Here is what it does:
|
||||
*
|
||||
* IF table/assignment (not loop)
|
||||
* AND the current row is the active (selected) row
|
||||
* AND it's an assignment (not a table).
|
||||
*
|
||||
* We need the last condition because the expressions of assignments
|
||||
* are drawn with COLOR_VAR_PASSIVE. (See build_assignment.)
|
||||
*/
|
||||
label_in_box_bg(value->widget,
|
||||
value->row && value->row->table->active_row == value->row ?
|
||||
value->row && value->row->table->active_row == value->row &&
|
||||
value->row->table->rows->next ?
|
||||
COLOR_CHOICE_SELECTED : COLOR_EXPR_PASSIVE);
|
||||
}
|
||||
|
||||
@ -620,6 +631,12 @@ static gboolean assignment_value_select_event(GtkWidget *widget,
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* In tables, expressions in the active row have a COLOR_CHOICE_SELECTED
|
||||
* background. While expressions in assignments are technically on the active
|
||||
* (and only) row, we use COLOR_VAR_PASSIVE for better readability.
|
||||
*/
|
||||
|
||||
static void build_assignment(GtkWidget *vbox, struct frame *frame,
|
||||
struct table *table)
|
||||
{
|
||||
|
@ -83,7 +83,7 @@
|
||||
#define COLOR_EXPR_PASSIVE "#f0f0ff"
|
||||
#define COLOR_EXPR_EDITING COLOR_EDITING
|
||||
#define COLOR_CHOICE_UNSELECTED COLOR_EXPR_PASSIVE
|
||||
#define COLOR_CHOICE_SELECTED "#9090ff"
|
||||
#define COLOR_CHOICE_SELECTED "#a0a0ff"
|
||||
#define COLOR_ROW_UNSELECTED COLOR_CHOICE_UNSELECTED
|
||||
#define COLOR_ROW_SELECTED COLOR_CHOICE_SELECTED
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user