|
From: | Jeremiah Benham |
Subject: | Re: [Denemo-devel] Gkt3 draw.c |
Date: | Mon, 14 Nov 2011 10:24:36 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
On 11/14/2011 05:40 AM, Richard Shann wrote:
I guess it's drawing now?
Yes. I thought I told you but I must have forgot.
I noticed you have allowed some buttons to get the keyboard focus as well as the drawing area in your last commit. This used to be quite a problem in Denemo, before it occurred to me to gray out the drawing area whenever it didn't have the focus. But, in any case, there is probably no point in allowing buttons to get keyboard focus (it would be for tabbing about amongst all the widgets and pressing Enter to click the button...), certainly if it means that after clicking a button a user has to re-focus on the drawing area.
Ok. So should this be used: gtk_widget_set_can_focus(GtkWidget *w, FALSE);Or should I just leave these out in exception of the scorearea? I only placed these in replacement for the GTK_WIDGET_UNSET_FLAGS(gui->buttonboxes, GTK_CAN_FOCUS);
Jeremiah
Richard On Sat, 2011-11-12 at 07:22 -0600, Jeremiah Benham wrote:Thanks. That was a big tip. I found that gtk3 does not send an "event_event" but a "draw" signal. Jeremiah Sent from my Samsung smartphone on AT&T Richard Shann<address@hidden> wrote:On Thu, 2011-11-10 at 16:10 -0600, Jeremiah Benham wrote:Oh. This does nothing! I will see what I can do.This bit at the end of draw.c is graying out the background when the drawing area does not have the focus: if (gtk_widget_has_focus (Denemo.scorearea)) { cairo_set_source_rgb (cr, ((0xFF0000&Denemo.color)>>16)/255.0, ((0xFF00&Denemo.color)>>8)/255.0, ((0xFF&Denemo.color))/255.0); } else { cairo_set_source_rgb (cr, 0.9, 0.9, 0.9); } So this should be easily visible (e.g. every time you use a menu). It seems strange that the drawing area should be painted white and then not change. Perhaps the draw is only being called once (there is some turning off of the draw signal while files are loaded ....) RichardJeremiah Sent from my Samsung smartphone on AT&T Richard Shann<address@hidden> wrote:On Thu, 2011-11-10 at 22:48 +0000, Richard Shann wrote:hmm, well, specifically there is a command d-BackgroundColor or something like that which could be invoked from the scheme window to see if the draw routine is firing and what it is doing.(d-SetBackground 0) and then (d-RefreshDisplay) should make everything black. Richard _______________________________________________ Denemo-devel mailing list address@hidden https://lists.gnu.org/mailman/listinfo/denemo-devel
[Prev in Thread] | Current Thread | [Next in Thread] |