summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* File chooser: Convert icons to using cairo_surface_twip/window-scales2Alexander Larsson2013-07-036-140/+173
|
* GtkCellRendererPixbuf: Add surface propertyAlexander Larsson2013-07-031-0/+19
|
* GtkImage: Add new_from_surface() and set_from_surface()Alexander Larsson2013-07-032-0/+82
|
* GtkIconHelper: Convert to using cairo surfaces as base and support scalesAlexander Larsson2013-07-033-26/+466
| | | | | | | | | | | We render the source into a cairo_surface_t so that we can render it with cairo directly, rather than having to convert it from a pixbuf every time. We also specify the target window when creating the cairo surface so that rendering can be faster. Using cairo surfaces also allows us to seamlessly support window scales. We also add a GTK_IMAGE_SURFACE source type.
* icon factory: Add gtk_icon_set_render_icon_surfaceAlexander Larsson2013-07-032-43/+118
| | | | | | | | | Support scales when falling back to loading icons from the icon theme. In order to actually render scaled icons we add gtk_icon_set_render_icon_surface which renders to a cairo_surface_t which includes whatever scaling you need for scaled icons.
* stylecontext: add gtk_render_icon_surfaceAlexander Larsson2013-07-034-1/+73
| | | | | | | | This draws an icon from a cairo_surface. We want to use this more rather than render_icon as this means we can skip the pixbuf to surface conversion (including allocation and alpha premultiplication) at render time, plus we can use create_similar_image which may allow faster rendering.
* GtkIconTheme: Add helpers to load to cairo_surface_tAlexander Larsson2013-07-032-0/+123
| | | | | | Right now this just uses the pixbuf load code and converts it to a surface. In the future we could cache the pattern to allow reusing the surface.
* icontheme: Add support for high resolution iconsCarlos Garnacho2013-07-032-114/+387
| | | | | | | | | | | | | | | | | | | | | An optional OutputScale integer key has been added to index.theme subdirs description, so icon themes may provide icons that are more suitable to render at a (typically 2x) integer upscaled resolution. This way it is possible to make eg. a 16x16@2x icon has a real size of 32x32, but contains a similar level of detail to the 16x16 icon so things don't look any more cluttered on high-dpi screens. The pixbuf lookup has changed so it prefers a minimal scale change that yields the minimal real size difference, so if looking up for a 16x16 icon at 2x, it would first prefer 16x16@2x, then 32x32, and then any other icon that's closest to match There is now *_for_scale() variants for all GtkIconTheme ways to directly or indirectly fetch a GdkPixbuf. This is based on code by Carlos Garnacho with changes by Alexander Larsson
* CellRendererPixbuf: Set the window on the icon helperAlexander Larsson2013-07-031-0/+2
| | | | This lets us get scaled icons if needed.
* spinbutton: set the window on the icon helperAlexander Larsson2013-07-031-0/+1
|
* entry: Set the window on the icon helperAlexander Larsson2013-07-031-0/+6
|
* GtkImage: Set the window on the gtkiconhelperAlexander Larsson2013-07-031-0/+18
|
* GtkIconHelper: Add set_window()Alexander Larsson2013-07-032-0/+16
| | | | | | This is a hint on where the icon will be drawn. It will allow us to pre-allocate cairo surfaces for the right target.
* gtk-demo: Add demo of hidpi css assets via -gtk-scaled()Alexander Larsson2013-07-036-2/+5
|
* CSS: Add -gtk-scaled(image1,image2,...) support for hidpi assetsAlexander Larsson2013-07-034-0/+264
|
* css: Add a scale argument to css-value compute vfuncAlexander Larsson2013-07-0333-24/+70
| | | | | | | | We need to be able to compute different GtkCssImage values depending on the scale, and we need this at compute time so that we don't need to read any images other than the scale in used (to e.g. calculate the image size). GtkStyleProviderPrivate is shared for all style contexts, so its not right.
* GtkWidget: Propagate scale to GtkStyleContextAlexander Larsson2013-07-031-0/+3
|
* GtkStyleContext: Add gtk_style_context_get/set_scaleAlexander Larsson2013-07-032-0/+49
|
* Use gdk_cairo_surface_create_from_pixbuf when possibleAlexander Larsson2013-07-033-29/+4
|
* Add GDK_DPI_SCALE env varAlexander Larsson2013-07-031-0/+10
| | | | | | | This is very useful for hidpi where the dpi is scaled to make non-dpi aware apps larger. In that case a dpi aware gtk+ using GDK_SCALE will be getting huge fonts. You can the set GDK_DPI_SCALE to compensate for this.
* gdk: Convert mouse position to doubles, add new gettersAlexander Larsson2013-07-0323-247/+381
| | | | | | | | We've long had double precision mouse coordinates on wayland (e.g. when rotating a window) but with the new scaling we even have it on X (and, its also in Xinput2), so convert all the internal mouse/device position getters to use doubles and add new accessors for the public APIs that take doubles instead of ints.
* x11: Don't follow dpi and scale from xsettings when GDK_SCALE setAlexander Larsson2013-07-034-8/+15
| | | | If things are hardcoded in the environment, that wins.
* x11: Add Gdk/UnscaledDPI to override Xft/DPIAlexander Larsson2013-07-032-1/+15
| | | | | | This lets use use a scaled Xft/DPI for old apps while not blowing up the size of scaled windows. Only apps supporting Gdk/WindowScaleFactor should supprt Gdk/UnscaledDPI.
* x11: Support the Gdk/WindowScalingFactor xsettingAlexander Larsson2013-07-036-5/+120
| | | | | This xsetting can be used to tell Gtk to use a specific window scaling for the screen.
* x11: Initial cut at supporting window scaling for X11Alexander Larsson2013-07-0313-189/+365
| | | | | | | | If you set GDK_SCALE=2 in the environment then all windows will be scaled by 2. Its not an ideal solution as it doesn't handle multi-monitors at different scales, and only affects gtk apps. But it is a good starting points and will help a lot on HiDPI laptops.
* wayland: Support gdk_window_get_scaleAlexander Larsson2013-07-031-10/+86
| | | | | | We track the list of outputs each window is on, and set the scale to the largest scale value of the outputs. Any time the scale changes we also emit a configure event.
* wayland: Require wayland-client 1.1.90Alexander Larsson2013-07-031-1/+1
| | | | This has the new methods required for buffer scaling.
* wayland: Implement gdk_screen_get_monitor_scale()Alexander Larsson2013-07-033-8/+77
| | | | | | We bind to the newer version of the wl_output which supports the new done and scale events, and if we use this to get the scale for each monitor (defaulting to 1 if not supported).
* gdk: Add gdk_cairo_surface_create_from_pixbufAlexander Larsson2013-07-032-23/+49
|
* gdk: add gdk_window_create_similar_image_surfaceAlexander Larsson2013-07-032-0/+72
| | | | | This lets us create image surfaces that render faster on specific windows. It also supports creating scaled image surfaces.
* gdkwindow: Respect cairo surfaces with device scaleAlexander Larsson2013-07-031-2/+19
| | | | | | | | | | If a cairo_surface for a window has a device scale set we need to respect this when creating a similar window. I.e. we want to then automatically create a larger window which inherits the scale from the original. We also need to calculate a different device_offset if there is a device_scale set.
* configure: Add buildtime check for cairo_surface_set_device_scaleAlexander Larsson2013-07-031-0/+11
| | | | | | We will need this for the window scale support, but its not yet in a stable cairo release (or even on a master yet), so we make this optional.
* pixel-cache: Refresh pixel cache on window scale factor changes.Alexander Larsson2013-07-031-1/+4
|
* widget: Track when the window scale factor changes and notifyAlexander Larsson2013-07-033-1/+52
| | | | | | The scale-factor property on the widgets will be notified, and the scale will change on the style property, causing us to pick up new css assets.
* gtk: add gtk_widget_get_scale_factor()Michael Natterer2013-07-032-1/+46
|
* quartz: Implement get_scale_factor() on screen and windowMichael Natterer2013-07-032-0/+51
|
* offscreenwindow: Handle window_scaleAlexander Larsson2013-07-031-10/+14
| | | | | We create similar windows in the right way to get the device scale right.
* add gdk_screen_ and gdk_window_get_scale_factor()Michael Natterer2013-07-036-1/+82
| | | | | These report the internal scaling factor, mapping from UI pixels to hardware pixels.
* win32: Remove unused functionsAlexander Larsson2013-07-032-38/+0
| | | | The _gdk_windowing_* stuff is not used anymore
* quartz: Remove unused functionsAlexander Larsson2013-07-031-101/+1
| | | | The _gdk_windowing_* stuff is not used anymore
* Updated POTFILES.skipPiotr Drąg2013-07-032-0/+4
|
* listbox: Use new private model, remove priv pointerAlexander Larsson2013-07-022-132/+127
|
* stack: Use new private model, remove priv pointerAlexander Larsson2013-07-022-57/+63
|
* revealer: Use new private model, remove priv pointerAlexander Larsson2013-07-022-35/+39
|
* Fix a copy-paste errorMatthias Clasen2013-07-011-1/+1
|
* gdk: Fix shaped toplevelsAlexander Larsson2013-07-011-2/+3
| | | | | | We need to apply the shape for toplevels that have a shape. https://bugzilla.gnome.org/show_bug.cgi?id=702831
* Fix typo in Makefile.amAlexander Larsson2013-07-011-1/+1
|
* Include crypt(3) implementation for MSVCChun-wei Fan2013-07-015-0/+501
| | | | | | | | | | This adds a crypt(3) implementation for use with broadwayd as Visual Studio does not support crypt(3) out of the box. The public domain implementation is taken from the following URL, http://michael.dipperstein.com/crypt/, where AFAICT this implementation would not be subject to licensing restrictions that would prevent it from being bundled.
* Broadway: Allow Compilation on Windows/MSVCChun-wei Fan2013-07-014-1/+14
| | | | | | | -Don't include unistd.h unconditionally as it's not available in Visual Studio, but include io.h where necessary. -Avoid C99isms, and use _chsize_s in place of ftruncate when unistd.h is not available (as in the case of Visual Studio)
* win32: Make broadway buildTarnyko2013-07-014-3/+5
|