Commit Graph

5043 Commits

Author SHA1 Message Date
Jasper St. Pierre
7623b97399 Remove legacy theming API
Since the move to GTK+ toplevels, it required removing the preview-widget
and theme-viewer parts of the code. (They didn't work with the new CSS
stuff anyway... shhh..)
2012-05-07 20:37:09 -03:00
Jasper St. Pierre
8d8e0cb055 uiframe: Make children respect border/padding
Also, center the label horizontally. There's still some shenanigans
I have to figure out with respect to vertical centering...

This should be in GTK+ by default...
2012-05-07 20:33:00 -03:00
Jasper St. Pierre
1620131434 ui: Make sure to invalidate the style on a retheme/redraw 2012-05-07 20:21:13 -03:00
Jasper St. Pierre
873da3405c frames: Only realize the widget after it's been properly associated
This makes sure that we don't get into a situation from a GTK+ handler
where we'll have an unassociated frame window.
2012-05-07 20:20:51 -03:00
Jasper St. Pierre
8a062b39ab display: Make meta_display_retheme_all public 2012-05-07 20:19:51 -03:00
Jasper St. Pierre
3ab3c8423e theme: Start using MetaUIFrame for the context path
Very soon we'll be scrapping this and doing something different internally
2012-05-05 02:11:34 -03:00
Jasper St. Pierre
11e1f687f9 theme: Remove support for painting layouts
We'll do this with a GtkLabel child instead. This means that the
mask text shadows are currently broken -- we'll fix up things later
to be better.
2012-05-05 01:30:30 -03:00
Jasper St. Pierre
25815473e6 theme: Scrap meta_theme_draw_frame
The more public symbols we remove, the closer we get to
not supporting the legacy theme API at all...
2012-05-05 00:00:47 -03:00
Jasper St. Pierre
5053997021 ui: Scrap MetaFrames, move rest of frame management into MetaUi
Additionally, rename the code that houses MetaUIFrame to uiframe.[ch],
and fix up some other places that depended on MetaFrames.
2012-05-04 23:48:10 -03:00
Jasper St. Pierre
b6468a7fa5 frames: Add a GtkWindow per frame
Now, now, it's not as bad as it sounds. We're using
gtk_widget_set_parent_window, as used by glade to embed
toplevel windows, to do our magic.
2012-05-04 23:10:28 -03:00
Jasper St. Pierre
e2e0ead870 theme: Remove some more unused methods 2012-05-04 13:32:53 -04:00
Jasper St. Pierre
f80a5d892f preview-widget: Don't override settings for the pango layout
This is now in CSS. Remove the now unused meta_gtk_widget_get_font_desc
as well.
2012-05-04 13:30:54 -04:00
Jasper St. Pierre
5823c5e0f5 ui: Remove text_height from the public theme interface
It wasn't being used
2012-05-04 13:29:18 -04:00
Jasper St. Pierre
ecac8c9d09 prefs: Remove titlebar font and use-system-font preferences
Specify them in CSS instead.
2012-05-03 23:21:37 -04:00
Jasper St. Pierre
2666303045 frames: Support rendering layouts 2012-05-03 23:17:36 -04:00
Jasper St. Pierre
0a9bc8995a frames: Support opacity in frame drawing
There's still a bug here (frame opacity doesn't "kick in" until we
change the frame geometry), and the colors aren't correct (we're
painting on top of a white surface, not a 0-alpha surface), but we
at least remove some redraw issues that come when you're not always
obscuring the last paint.
2012-05-03 16:03:45 -04:00
Jasper St. Pierre
143436c37c frames: Remove reset_frames / unflicker_bg 2012-05-03 16:00:26 -04:00
Jasper St. Pierre
7c11e0b0eb frames: Remove caching
XXX hack just to see how slow it is
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
beccdd64f5 frames: Remove invalidate_cache_timeout
WTF was this for? Was this a hacky bugfix? The git log gives no
information.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
dd0a6d7e08 frames: Only make one call to meta_frames_paint 2012-05-02 14:37:17 -04:00
Jasper St. Pierre
02bb550bd6 theme: Calculate frame geometry borders from CSS
Use the CSS 'border' and 'padding' properties rather than frame geometry.
This is a bit messy, so I'll fix it up with a new path representing the
titlebar soon.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
8f789a8fad ui: Remove meta_ui_theme_get_frame_borders
The function is easily replaced, and also becomes more correct
as different window types may have different extents.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
865b9df9a9 window-actor: Use MetaRegionBuilder when scanning the visible region
This gives a pretty solid performance improvement when resizing windows.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
1e9268045d window-actor: Add a debugging tool to write a region to a PNG
Just a helper function that I keep rewriting all over the place.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
20acb73024 frames: Remove get_frame_bounds
It's now unused, and we can't use it if we want to let GTK+ paint and
scan the frame region. With it, we can also stop depending on the
terrible GTK+ hack and remove the corner radius properties in the
frame geometry, as they aren't needed any more.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
b97ad209c2 window-actor: Don't use get_frame_bounds
We want to remove it.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
f2d8e3266b window-actor: Use cairo to paint regular shape region 2012-05-02 14:37:16 -04:00
Jasper St. Pierre
11be2fa36a window-actor: Work around cairo bug
Thank to Company and ickle, a cairo bug was identified and then fixed.
They helped me verify I'm not going insane!

http://cgit.freedesktop.org/cairo/commit/?id=ec400daf9ec3bbd8403324db7fcdaf175e185e7b
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
302302a116 window-actor: Paint the frame mask with GTK+ as well
Use meta_theme_render_background to paint the background of the frame,
and then scan it to give us a region we can use to generate the shape
region from. It may be worth looking at the uses of the shape region
to see if we can replace some (all?) of them by masks instead, so we
don't have to scan the mask.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
fd13dad0c4 window-actor: Use cairo_region_create_rectangles
Instead of the bunch of unions.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
2da1ed1ae0 theme: Split GtkStateFlags grabbing code out 2012-05-02 14:37:16 -04:00
Jasper St. Pierre
58f04c7284 Add simple dumb CSS rendering 2012-05-02 14:37:16 -04:00
Jasper St. Pierre
a6737ef129 theme: Make meta_frame_style_draw_with_style private 2012-05-02 14:37:16 -04:00
Jasper St. Pierre
52fee4df1c window-actor: Add back antialiased window corners
This simply adds fancy arcs to the mask texture.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
8da12ac0e0 window-actor: Punt mask generation to MetaWindowActor
This effectively makes MetaShapedTexture not a MetaShapedTexture,
but a simple and dumb MetaMaskedTexture, with an optimization for
clipped regions.

We're doing this as the mask may need to be more complicated than
made of a region plus a "cairo overlay" -- we eventually want GTK+
to draw the rounded corner background.

Save rounded corners for a later commit, again.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
e43f8db6e8 window-actor: Remove an unnecessary frame check
meta_frame_calc_borders will zero out the borders if we don't have a frame.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
a7cbc9ad9a meta-shaped-texture: Remove corners for now
We'll add them back with gtk_render_background
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
0be3f81841 theme: Use a MetaWindow path rather than a GtkWidget path
This is a terrible ugly hack.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
f53e26bc39 frames: Fix border-radius stupidity
Since we're breaking the theme format, we don't need to do this any
logner.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
cc3be6da4d theme: Parse window radiuses from CSS
This requires a local hack to GTK+ that's ugly and I'm not sharing it.
We'll do things properly soon enough.
2012-05-02 14:37:15 -04:00
Jasper St. Pierre
fef2a061a8 theme: Require a GTK+ style context in meta_theme_calc_geometry 2012-05-02 14:37:15 -04:00
Jasper St. Pierre
bdb995d758 theme: Make meta_frame_layout_calc_geometry private 2012-05-02 14:37:15 -04:00
Jasper St. Pierre
2a729f89aa preview-widget: Remove the unused meta_preview_get_clip_region
Besides being unused, it used meta_theme_get_frame_style. Since we
want to remove the static style layout structs, we need to remove
usage of that. Removing unused usage is the way to go.
2012-05-02 14:37:15 -04:00
Jasper St. Pierre
af242b27b2 ui: Move theme variant code loading into theme.c
As we'll have a new API that draws using GtkStyleContext, it makes sense
to put all API using GtkStyleContext where the theme code is. Note that
the MetaThemeVariant code is just a stop-gap right now - in the future,
we'll have per-window theming, using CSS infrastructure like includes
for code reuse.
2012-05-02 14:37:15 -04:00
Jasper St. Pierre
a198ff415a theme: Remove dead code
While the comment claims that we may want to keep this around
for optimization purposes, the operations are raw bitmap operations
that would be cleaner done in cairo.

https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
981c1c2ab5 theme: Remove bogus comment
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
fb35f9fa49 theme: Replace char array element comparisons with strncmp
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
9194a04faa theme: Remove COLORIZE feature of images
From a quick code search and grep of gnome-themes-standard, none of
the themes that I inspected used this feature. Since it's the last
thing that uses a lot of old legacy GdkPixbuf code, I'd rather just
consider the feature unsupported at this point and clean up everything
I need to.

https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
a0ed41d8ce theme: Use cairo for drawing uncolorized IMAGEs
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
e3e87727b6 theme: Use cairo for TINT operations with alpha
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00