On Sun, 06 Oct 2013 13:32:35 +1100 Matt Flax <flatmax flatmax org> wrote:
Johannes's patch is now in master. We have replaced most of the GTK2 legacy and depreciated code now ... although there is probably more to do.
Since GtkDatabox is derived from GtkWidget it should implement the following virtual functions widget_class->get_request_mode widget_class->get_preferred_height widget_class->get_preferred_width widget_class->get_preferred_height_for_width widget_class->get_preferred_width_for_height that cover geometry management. I've done that already in my current project by writing my own object that is derived from GtkDatabox. This new object provides a property called "height-to-width-ratio" that makes the height to width ratio of the widget adjustable at runtime. Probably this is very specific to my application, but may be of interest for GtkDatabox too. To get a grasp of the effect in my application i appended a screenshot with three boxes with different "height-to-width-ratio". Of course in the general case geometry management should cover more usecases. Nevertheless the above virtual functions should be implemented... Best regards
Please note that we are now using GtkGrid instead of GtkTable for holding the box, rulers and scrollbars. I have also started making the effort to properly address the xthickness and ythickness replacements for padding using the gtk_style_context_get_padding and related functions in gtkdatabox_ruler.c I think the biggest question at the moment is why the GTK3 plotting is slower then the GTK2 plotting ? Compare examples/lissajous in both master and GTK2 to see the difference. Matt On 05/10/13 22:24, Matt Flax wrote:Hi Johannes, Can you please post the diff patches to the list ? Preferably w.r.t. the latest commits. thanks Matt On 05/10/13 21:01, Johannes Deutsch wrote:On Sat, 05 Oct 2013 17:18:33 +1000 Matt Flax <flatmax flatmax org> wrote:Hi all, I have merged master into the GTK2 branch and I have merged cairo-alpha into master. If you want GTK2 compliant code, checkout the GTK2 branch. If you want GTK3 compliant code, checkout master.In my point of view it's the right step, thanks for making this conceptual step.I have successfully run all of the examples in the master (GTK3) branch... all of the examples are working.I don't know who maintains the git repository on sourceforge at the moment. Since, i don't get any comments on my merge request, that fix some issues on the former `cairo-alpha` branch it would be great if anybody could test the changes and may merge it into the current master branch. If you compile `gtkdatabox` with my `cairo-alpha` HEAD checked out some of my changes should be obvious. For example: - only draw selection if selection_active - draw bottom-line of GtkRuler correctly also when GTK_ORIENTATION_VERTICAL - added databox- and ruler-Widget to background style class Others aren't so obvious but are nevertheless important to get rid of deprecated gtk features like: - change GdkColor to GdkRGBA - migrate GtkTable related code to GtkGrid And one little speed related fix, that disables anti aliasing. Thanks in advance for looking at my changes and best regards...Here are some things I noted whilst I was merging ... these things need fixing at some point ... Mouse wheel scrolling is not working in the GTK3 branch ... it wasn't working in the cairo-alpha branch either when I checked. I have not spent time on glade or libglade for now - do they use GTK3 ? In the code, there are some spots with "WHAT_TO_DO_HERE" and "TODO" commenting and commenting out code ... these should be addressed at some point. Hope you're all having a good weekend! Matt _______________________________________________ gtkdatabox-list mailing list gtkdatabox-list gnome org https://mail.gnome.org/mailman/listinfo/gtkdatabox-list_______________________________________________ gtkdatabox-list mailing list gtkdatabox-list gnome org https://mail.gnome.org/mailman/listinfo/gtkdatabox-list_______________________________________________ gtkdatabox-list mailing list gtkdatabox-list gnome org https://mail.gnome.org/mailman/listinfo/gtkdatabox-list_______________________________________________ gtkdatabox-list mailing list gtkdatabox-list gnome org https://mail.gnome.org/mailman/listinfo/gtkdatabox-list
Attachment:
2013-10-06-143948_1276x759_scrot.png
Description: PNG image