On 21 April 2012 21:10, Andrew Melo <andrew.m...@gmail.com> wrote: > Hello again, > > On Thu, Apr 19, 2012 at 1:42 AM, Chris Debenham <ch...@adebenham.com>wrote: > >> I do a similar to this in Lyricue (which is used to display >> text/images/video to a projector - It also shows small preview versions >> using scaling) >> Basically what I do is tell the app to be fullscreen, then get the window >> width/height >> That those values and figure out the scale of each compared to your >> design res >> I put all elements of the design under a single clutter_group and then >> use 'clutter_actor_set_scale' to scale the dimensions. >> ie: >> stage_width = 1600; >> stage_height = 900; >> stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED >> (clutter_widget)); >> actors = clutter_group_new (); >> clutter_container_add (CLUTTER_CONTAINER (stage), actors, NULL); >> double window_scale_w = >> (double) clutter_actor_get_width (stage) / (double) stage_width; >> double window_scale_h = >> (double) clutter_actor_get_height (stage) / (double) stage_height; >> clutter_actor_set_scale (actors, window_scale_w, window_scale_h); >> >> > Also, is there something I can bind to the stage to get it to update when > the window changes resolutions? I tried binding with > #self.stage.connect('allocation-changed', self.handleResize) > And though the callback fires, it doesn't scale the stage properly. > > Thanks, > andrew > > I use the "notify::width" and "notify::height" signals. ie: g_signal_connect (stage, "notify::width", G_CALLBACK (size_change), NULL); g_signal_connect (stage, "notify::height", G_CALLBACK (size_change), NULL);
>> On 19 April 2012 00:58, Andrew Melo <andrew.m...@gmail.com> wrote: >> >>> Hello, >>> >>> I'm new to clutter and I'm not really sure how to implement the >>> following: >>> >>> I'm working on a "dashboard" to monitor some services we run. It's >>> intended to be run full-screen on both large monitors we have around the >>> office or from administrators' laptops/desktops. Because of this, there are >>> a large number of target resolutions. However, it appears the in-clutter >>> units are set to pixels. >>> >>> Is there a way to scale the stage so that the it's always >>> (0,0)-(1600,900), regardless of the resolution? (if the aspect ratio of the >>> stage is wrong, I'm indifferent to whether the stage is stretched or >>> letterboxed) >>> >>> Sorry if this is an easy question, but I couldn't find anything in the >>> API or online (perhaps I'm searching wrong) >>> >>> Thanks, >>> Andrew >>> >>> -- >>> -- >>> Andrew Melo >>> >>> >>> _______________________________________________ >>> clutter-app-devel-list mailing list >>> clutter-app-devel-list@clutter-project.org >>> http://lists.clutter-project.org/listinfo/clutter-app-devel-list >>> >>> >> > > > -- > -- > Andrew Melo > >
_______________________________________________ clutter-app-devel-list mailing list clutter-app-devel-list@clutter-project.org http://lists.clutter-project.org/listinfo/clutter-app-devel-list