Benjamin Otte
dc4148c4e2
notebook: Simplify gtk_notebook_map()
...
We set visibility on our children properly, so we can simply chain up
and let the GtkContainer implementation do the mapping of children.
2016-01-11 17:05:22 +01:00
Benjamin Otte
22398ef459
notebook: Remove irrelevant case
...
The page is never the current page, because it was just created and the
current page wasn't changed yet.
2016-01-11 17:05:22 +01:00
Benjamin Otte
0e528ec74e
notebook: No page switching in size request code
...
We have page switching under control now, we don't need to check every
get_preferred_size() call.
2016-01-11 17:05:22 +01:00
Benjamin Otte
1190efebce
notebook: Set the current page when none is set
...
This case happens when you gtk_widget_show_all (notebook).
2016-01-11 17:05:22 +01:00
Benjamin Otte
0045e57e96
notebook: Draw the same things, no matter the show-border value
...
show-border modifies the "frame" style class on the notebook node, but
not what we actually draw.
2016-01-11 17:05:22 +01:00
Benjamin Otte
fd9ffe5d57
notebook: Turn the base notebook into a gadget
2016-01-11 17:05:22 +01:00
Benjamin Otte
92089ee29e
notebook: Draw tab label while drawing tab
...
Instead of having special case code doing it.
2016-01-11 17:05:22 +01:00
Benjamin Otte
3d980da405
notebook: Don't translate before painting notebook
...
This will allow us to draw children directly from within the notebook
drawing code, which will remove a bunch of special casing.
2016-01-11 17:05:22 +01:00
Benjamin Otte
93dc364b02
notebook: Deprecate and stop supporting has-tab-gap style property
2016-01-11 17:05:22 +01:00
Benjamin Otte
71cc212eb5
notebook: Ignore and deprecate style properties
...
Deprecate initial-gap, tab-curvature and tab-overlap properties. All
their features can be achieved using CSS.
This CSS achieves the same effect as a 10px initial gap:
notebook header {
margin-left: 10px;
margin-right: 10px;
}
A tab overlap of 10px can be achieved via:
notebook tabs {
margin-left: 10px;
}
notebook tab {
margin-left: -10px;
}
And tab curvature is essentially the same as padding or border on a tab.
2016-01-11 17:03:07 +01:00
Benjamin Otte
0138af9f96
rendericon: Save and restore cairo matrix
...
... instead of requiring cairo_save()/cairo_restore().
2016-01-11 17:03:07 +01:00
Benjamin Otte
fa7816d99c
dnd: When setting a dnd icon widget, unset old one
...
Setting a DND icon twice should actually work and not cause warnings the
2nd time.
2016-01-11 16:56:16 +01:00
Krzesimir Nowak
67c6d24bb2
Fix a small mistake in stylecontext docs
...
Fix the "will be also be" to become "will also be".
2016-01-11 12:05:27 +01:00
Matthias Clasen
b035cc2cb6
Update style class docs
...
Instead of pointing to (outdated) widgets here, just refer to
widget docs in general.
2016-01-10 17:08:56 -05:00
Matthias Clasen
cffe2e2c93
Improve GtkStyleContext docs
...
Refer to the foreign drawing example in gtk3-demo, refer to
the widget documentation for style properties, remove
no-longer-used treeview regions.
2016-01-10 17:05:53 -05:00
Ting-Wei Lan
0f120ea510
Cast the return value of g_array_free to void* before casting to char**
...
Let the compiler know that we don't want to use it as char*, so there is
no alignment error.
https://bugzilla.gnome.org/show_bug.cgi?id=760350
https://bugzilla.gnome.org/show_bug.cgi?id=755659
2016-01-11 00:23:46 +08:00
Matthias Clasen
0ddc1eed19
Fix rendering of unsymmetric borders
...
There was an errant path that threw off our clipping for
the top section of the border.
https://bugzilla.gnome.org/show_bug.cgi?id=722937
2016-01-09 23:44:43 -05:00
Matthias Clasen
caaf537f94
Avoid division by 0 in the border rendering code
...
We skip sides with 0 border width in render_border, but when
we collect sides with the same style, we may pass the 0 width
down to render_frame_stroke anyway. So skip width 0 sides
there as well.
2016-01-09 23:44:43 -05:00
Matthias Clasen
12bc8ddb93
Fix dobule border rendering
...
This is the same fix that was applied for ridge and groove
style in 9f27ee7f5a
.
2016-01-09 14:37:04 -05:00
Lapo Calamandrei
152171e60c
Adwaita: transparent background for progressbar.osd
...
Hopefully fixes https://bugzilla.gnome.org/show_bug.cgi?id=760331
Added the .osd style class to the progressbar docs.
2016-01-09 20:05:41 +01:00
Lapo Calamandrei
6da0a0a106
gtkheaderbar: add titlebutton styleclass to the separator
...
...of the window control buttons
2016-01-09 19:27:15 +01:00
Lapo Calamandrei
99365753bf
Adwaita: shortcut window related fixes
2016-01-09 18:03:26 +01:00
Lapo Calamandrei
44e0e1359c
Adwaita: avoid colorswatch growing when drop targets
2016-01-09 15:30:20 +01:00
Lapo Calamandrei
239303b3f8
Adwaita: more scss cosmetics
2016-01-09 14:36:05 +01:00
Lapo Calamandrei
2050ed04dd
Adwaita: rely on background-image for paned wide separators
...
this workaround fixes the rendering issue coming out using borders
2016-01-09 13:35:48 +01:00
Lapo Calamandrei
4355cb45d7
Adwaita: make the paned wide separator scss code correct
...
unfortunatelly the results are not, borders behaves in a weird way
here as well, if this don't get fixed I'll rely on background here
too.
2016-01-09 13:04:27 +01:00
Lapo Calamandrei
2b57ba61d5
Adwaita: some scss cosmetic changes
2016-01-09 12:38:49 +01:00
Lapo Calamandrei
f09483bb98
Adwaita: fix thin paned separators
2016-01-09 12:31:41 +01:00
Lapo Calamandrei
b143ed98b3
Adwaita: use stricter selectors on paned separators
...
this fixes the "fat" separator on gedit headerbar, since it was
cought by the paned separator styling.
2016-01-09 12:07:52 +01:00
Lapo Calamandrei
367543c0e8
Adwaita: remove old headerbar separator styling
...
which was actually selecting nothing now.
2016-01-09 11:55:40 +01:00
Lapo Calamandrei
4853303dd7
Adwaita: add vertical margins to headebar entries and separators
2016-01-09 11:25:08 +01:00
Lapo Calamandrei
bf48dd9d7c
Adwaita: add vertical margins to headerbar buttons
...
to avoid them spanning the whole headerbar height with the changes
introduced in my last commit.
2016-01-09 10:19:47 +01:00
Matthias Clasen
375619f9f4
Fix make dist
...
I've forgotten another place when renaming HighContrast inverse.
2016-01-08 18:29:58 -05:00
Matthias Clasen
4b7c8218fb
Use standard cursor names for DND
...
At least as far as we have them. CSS has on equivalent of dnd-ask,
so we keep using that name as-is.
2016-01-08 18:11:07 -05:00
Cosimo Cecchi
f2685ddf5e
colorswatch: don't apply padding twice
...
Instead of taking the border and manually removing it from the
allocation, render our background over all the border allocation box, as
that's more correct and does not take padding into account twice.
2016-01-08 14:58:25 -08:00
Carlos Garnacho
e62f1604f9
paned: Use GtkGestureDrag for anything else than touch
...
The GtkGesturePan behavior of locking onto certain orientations may
come across as confusing, and is not strictly necessary for mice and
other pointing devices.
As GtkGesturePan is also a GtkGestureDrag, we just use the same
callbacks on both gestures.
https://bugzilla.gnome.org/show_bug.cgi?id=759670
2016-01-08 22:03:05 +01:00
Lapo Calamandrei
48fbe5137e
Adwaita: avoid too tall headerbars
...
the vertical padding from the headerbar has been removed, now the
sizing is done with min-height, this avoids title and subtitle
labels making the headbar.
2016-01-08 20:56:40 +01:00
Matthias Clasen
3f56c530b3
Be more careful with floating point divisions
...
The assumption that MIN() takes care of all infinities here
turns out to be wrong. We were getting inf and -nan for some
combinations of 0 width/height and corners, leading to invalid
matrices and cairo errors.
https://bugzilla.gnome.org/show_bug.cgi?id=759668
2016-01-08 13:17:58 -05:00
Matthias Clasen
d3aea5c498
Forgotten file
...
One was forgotten in the dark -> inverse rename.
2016-01-08 11:12:55 -05:00
Matthias Clasen
000b5b9055
color editor: Set a name on the color sample
...
This can be used to tweak the style from CSS, via #editor-color-sample.
2016-01-08 11:10:02 -05:00
Lapo Calamandrei
91123adba7
Adwaita: remove some now uneeded selectors
...
...related to image-button sizing which is handled differently now.
2016-01-08 16:48:01 +01:00
Lapo Calamandrei
5de71413fe
Adwaita: colorchooser and color button style rewrite
...
fixing https://bugzilla.gnome.org/show_bug.cgi?id=760169 in the
process.
2016-01-08 16:41:58 +01:00
Matthias Clasen
d72e061bb9
Rename the HighContastInverse css files
...
Renaming the files from -dark to -inverse makes it more obvious
that this is not a dark variant in the sense of the 'prefer-dark'
setting, but rather a separate theme (sharing the same CSS).
2016-01-08 07:39:17 -05:00
Matthias Clasen
9f247e112b
Deprecate cursor-color style properties
...
These have been replaced by CSS properties.
2016-01-08 07:33:20 -05:00
Matthias Clasen
9b86d6da2c
Use the caret-color properties for drawing carets
...
Replace the cursor-color and secondary-cursor-color style
properties with the caret-color and -gtk-secondary-caret-color
CSS properties.
For the 'auto' value of these properties, we keep the same
behavior that we used to have when the style properties are
not explicitly set.
2016-01-08 07:33:20 -05:00
Matthias Clasen
fdba244c38
Add the caret-color CSS property
...
This property is defined in http://www.w3.org/TR/css3-ui/#caret-color .
We also add a -gtk-secondary-caret-color property, since GTK+ has
supported differently colored split cursors in the past. Unlike
CSS, we don't support the weakly defined auto keyword, and just
use currentColor as the initial value.
2016-01-08 07:33:20 -05:00
Alberto Ruiz
496f0892fc
introspection: This patch fixes nullable return values fixes for the following symbols in gtk
...
gtk_accel_group_query
gtk_accel_group_from_accel_closure
gtk_accel_label_get_accel_widget
gtk_accessible_get_widget
gtk_actionable_get_action_name
gtk_app_chooser_get_app_info
gtk_app_chooser_button_get_heading
gtk_app_chooser_dialog_get_heading
gtk_application_get_window_by_id
gtk_assistant_get_nth_page
gtk_binding_set_find
gtk_builder_get_object
gtk_builder_lookup_callback_symbol
gtk_builder_get_application
gtk_button_get_image
gtk_cell_area_get_focus_from_sibling
gtk_cell_renderer_start_editing
gtk_cell_view_get_model
gtk_cell_view_get_displayed_row
gtk_clipboard_get_owner
gtk_container_get_focus_child
gtk_container_get_focus_vadjustment
gtk_container_get_focus_hadjustment
gtk_dialog_get_widget_for_response
gtk_drag_get_source_widget
gtk_drag_dest_get_target_list
gtk_drag_source_get_target_list
gtk_entry_completion_get_model
gtk_entry_completion_compute_prefix
gtk_expander_get_label_widget
gtk_file_chooser_get_filename
gtk_file_chooser_get_current_folder
gtk_file_chooser_get_uri
gtk_file_chooser_get_current_folder_uri
gtk_file_chooser_get_preview_widget
gtk_file_chooser_get_preview_file
gtk_file_chooser_get_preview_filename
gtk_file_chooser_get_preview_uri
gtk_file_chooser_get_extra_widget
gtk_file_chooser_get_filter
gtk_file_chooser_native_get_accept_label
gtk_file_chooser_native_get_cancel_label
gtk_file_filter_get_name
gtk_font_chooser_get_font_family
gtk_font_chooser_get_font_face
gtk_font_chooser_get_font
gtk_font_chooser_get_font_desc
gtk_font_chooser_get_font_map
gtk_frame_get_label
gtk_gesture_get_device
gtk_gesture_get_window
gtk_gl_area_get_error
gtk_header_bar_get_title
gtk_header_bar_get_subtitle
gtk_header_bar_get_custom_title
gtk_icon_info_get_filename
gtk_icon_view_get_path_at_pos
gtk_icon_view_get_model
gtk_image_get_pixbuf
gtk_image_get_animation
gtk_label_get_mnemonic_widget
gtk_label_get_attributes
gtk_check_version
gtk_menu_button_get_popup
gtk_menu_button_get_menu_model
gtk_menu_button_get_align_widget
gtk_menu_button_get_popover
gtk_menu_item_get_submenu
gtk_menu_item_get_accel_path
gtk_native_dialog_get_title
gtk_native_dialog_get_transient_for
gtk_notebook_get_nth_page
gtk_notebook_get_tab_label_text
gtk_notebook_get_menu_label
gtk_notebook_get_menu_label_text
gtk_notebook_get_group_name
gtk_notebook_get_action_widget
gtk_offscreen_window_get_surface
gtk_offscreen_window_get_pixbuf
gtk_paned_get_child1
gtk_paned_get_child2
gtk_places_sidebar_get_location
gtk_places_sidebar_get_nth_bookmark
gtk_plug_get_socket_window
gtk_popover_get_default_widget
gtk_progress_bar_get_text
gtk_recent_filter_get_name
gtk_recent_manager_lookup_item
gtk_settings_get_default
gtk_socket_get_plug_window
gtk_stack_sidebar_get_stack
gtk_stack_switcher_get_stack
gtk_style_context_get_section
gtk_style_context_get_parent
gtk_style_context_get_frame_clock
gtk_test_find_widget
gtk_text_buffer_get_mark
gtk_text_tag_table_lookup
gtk_text_view_get_tabs
gtk_text_view_toggle_cursor_visible
gtk_text_view_get_window
gtk_toolbar_get_nth_item
gtk_tool_button_get_label
gtk_tool_button_get_icon_name
gtk_tool_button_get_label_widget
gtk_tool_button_get_icon_widget
gtk_tool_palette_get_drop_item
gtk_tool_palette_get_drop_group
gtk_tree_model_filter_convert_child_path_to_path
gtk_tree_model_filter_convert_path_to_child_path
gtk_tree_model_sort_convert_child_path_to_path
gtk_tree_model_sort_convert_path_to_child_path
gtk_tree_view_get_column
gtk_tree_view_get_bin_window
gtk_tree_view_column_get_widget
gtk_tree_view_column_get_tree_view
gtk_widget_get_frame_clock
gtk_window_group_get_current_device_grab
GtkTextBufferSerializeFunc
2016-01-08 12:18:23 +00:00
Olivier Fourdan
28f011eb05
wayland: prefer subsurface when possible
...
Quite a few applications use GTK_WINDOW_POPUP to create various
temporary windows and place then on screen. That works fine on X11 but
on Wayland there is no global coordinate system for regular surfaces.
If the application is using a gdk temp window and set a parent with
gtk_window_transient_for(), the gdk wayland backend has all it needs to
create a subsurface that can be placed at will by the application.
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759738
2016-01-08 10:33:26 +01:00
Timm Bäder
d85b3fc60d
revealer: Propagate draw event
2016-01-08 09:38:32 +01:00
Timm Bäder
711ffd648e
GtkPopover: Protect against transparent backgrounds
...
If the background is transparent, we can't use it for the input shape,
since that will be empty. Draw a box with rounded corners irectly
instead, in fully opaque black.
https://bugzilla.gnome.org/show_bug.cgi?id=759905
2016-01-08 09:14:03 +01:00