Bug 14485 - [gdk] Start implementing native styling in RenderThemeGdk.cpp
Summary: [gdk] Start implementing native styling in RenderThemeGdk.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 14119 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-30 18:05 PDT by Holger Freyther
Modified: 2007-07-06 02:57 PDT (History)
1 user (show)

See Also:


Attachments
Use GtkStyle and Gtk* for implementing RenderThemeGdk (10.63 KB, patch)
2007-06-30 18:06 PDT, Holger Freyther
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Freyther 2007-06-30 18:05:50 PDT
Start implementing native-styling. The approach is to have one native control for each type (Button,RadioButton,CheckBox,TextArea,TextEdit,...). And to get spacing, margings and other options from the widget and to use the attached GtkStyle for the actual drawing.

The current patch starts with the mapping from Type (Button, CheckBox...) to native control. It does not yet honor the State of the Widget and the spacing informations do not honor the GtkStyle. But I think that this is the right approach to theming.
Comment 1 Holger Freyther 2007-06-30 18:06:54 PDT
Created attachment 15336 [details]
Use GtkStyle and Gtk* for implementing RenderThemeGdk

Start using native controls for rendering.
Comment 2 Alp Toker 2007-07-03 05:46:34 PDT
*** Bug 14119 has been marked as a duplicate of this bug. ***
Comment 3 Alp Toker 2007-07-05 09:43:08 PDT
For reference, this is how Mozilla seems to do it:
  http://www.koders.com/c/fid26B2A9B188A1947EB8710750C3D48FFAF7CCC4A4.aspx

When Gtk+ bug http://bugzilla.gnome.org/show_bug.cgi?id=318807 (Offscreen windows and window redirection) is fixed, native styling might become less tedious.

Locally I've updated the patch so determineState() returns a GtkStateType which I then pass to the gtk_paint_box() calls. This works well.

Right now we end up copying the background colour whereas we actually want to keep transparency.
Comment 4 Maciej Stachowiak 2007-07-06 02:50:06 PDT
Comment on attachment 15336 [details]
Use GtkStyle and Gtk* for implementing RenderThemeGdk

Seems like a fine start. r=me
Comment 5 Mark Rowe (bdash) 2007-07-06 02:57:58 PDT
Landed in r24051.