Commit Graph

26465 Commits

Author SHA1 Message Date
Lapo Calamandrei
de466e7b28 Adwaita: rework places sidebar styling
set colors on rows istead of images.
2016-03-20 23:38:49 +01:00
Lapo Calamandrei
524ca3c2d5 Adwaita: fix treeview spinbutton style 2016-03-20 23:33:51 +01:00
Lapo Calamandrei
c867b17cc8 Adwaita: fix treeview entry style
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=763955
2016-03-20 23:18:49 +01:00
Jakub Steiner
7224dd76db High Contrast: sidebar round buttons
https://bugzilla.gnome.org/show_bug.cgi?id=763774
2016-03-20 22:07:03 +01:00
Paolo Borelli
d457b4f4a5 css: use "disabled" instead of the "insensitivie"
Not only there is a typo, but it is also deprecated.
2016-03-20 17:49:15 +01:00
Benjamin Otte
710285104b styleproperties: Really don't use 'i' in inner loop
I apparently was too tired when doing
8cebc125da and forgot to replace one
instance of 'i' with 'j'.

Thanks Timm for finding that one.
2016-03-20 13:43:46 +01:00
Benjamin Otte
8cebc125da styleproperties: Don't use the same loop variable in nested loops
http://www.viva64.com/en/b/0383/
2016-03-20 05:37:23 +01:00
Benjamin Otte
ca3607c219 menubar: Remove duplicate flags value
http://www.viva64.com/en/b/0383/
2016-03-20 05:30:43 +01:00
Benjamin Otte
c76424a842 calendar: Remove duplicate flags value
http://www.viva64.com/en/b/0383/
2016-03-20 05:27:19 +01:00
Benjamin Otte
58b7512b53 cssshadowvalue: Fix copy/paste issue
http://www.viva64.com/en/b/0383/
2016-03-20 05:26:39 +01:00
Benjamin Otte
3308122c32 placesview: Simplify
http://www.viva64.com/en/b/0383/
2016-03-20 05:18:38 +01:00
Benjamin Otte
c6834a002f pathbar: Order button CSS nodes right
The previous code ordered them the wrong way, so the first button (from
a CSS pov) was the last visible one.
2016-03-20 05:18:04 +01:00
Lapo Calamandrei
397bacee6e Adwaita: fix places sidebar icons style
the color wasn't changing in backdrop.
2016-03-19 20:13:06 +01:00
Lapo Calamandrei
0174803149 Adwaita: added a transition to the backdrop state to most widgets 2016-03-19 19:56:15 +01:00
Lapo Calamandrei
38211ff800 Adwaita: clean up checkbutton and radiobutton styling
some superfluous selectors there since generic label styling was
broken.
2016-03-19 18:59:29 +01:00
Lapo Calamandrei
ec50042228 Revert "Adwaita: checkbutton and radiobutton backdrop color fix"
This reverts commit 43937c6aa0.
Which was needed since the label styling was broken.
2016-03-19 18:57:33 +01:00
Lapo Calamandrei
e079b92a55 Adwaita: fix label styling
backdrop wasn't in the mix, added and adjusted other widgets
styling not to be overridden by it when not needed.
Spotted a typo making the backdrop base color white in the process.
2016-03-19 18:56:41 +01:00
Lapo Calamandrei
20a8ac5542 Adwaita: reset entry props on horizontal spinbuttons
the spinbutton node is where the styling is applied, the leftover
properties on the entry node make a backdrop transition bad.
2016-03-19 18:09:22 +01:00
Lapo Calamandrei
8f2213836c Adwaita: remove commented out code 2016-03-19 17:53:36 +01:00
Lapo Calamandrei
43937c6aa0 Adwaita: checkbutton and radiobutton backdrop color fix
this sets the right backdrop color to the label insider the
aformentined widgets.
2016-03-19 17:46:49 +01:00
Lapo Calamandrei
99e2f91dfe Adwaita: simplify headerbar style 2016-03-19 17:23:39 +01:00
Lapo Calamandrei
5a0aeec3f4 Adwaita: correctly order backdrop decoration node shadows
... otherwise setting a transition to the backdrop state will make
the window resize, since the shadows size gets interpolated.
2016-03-19 17:08:17 +01:00
Lapo Calamandrei
50b5820669 High Contrast: switch style fix 2016-03-18 19:25:09 +01:00
Lapo Calamandrei
48fb37f341 High Contrast: don't hardcode a font-size on the switch 2016-03-18 19:10:36 +01:00
Lapo Calamandrei
a46058451e High Contrast: stronger entry focus indication 2016-03-18 19:05:20 +01:00
Lapo Calamandrei
7d27fd087e High Contrast: fix a typo 2016-03-18 19:03:19 +01:00
Lapo Calamandrei
3b1484f57c Adwaita: fix colorscale shrinking when disabled 2016-03-18 18:38:48 +01:00
Jakub Steiner
ad9865126a High Contrast: fix drop states
https://bugzilla.gnome.org/show_bug.cgi?id=763823
2016-03-18 15:48:52 +01:00
Jakub Steiner
3a529614e5 High Contrast: spinbutton active state
- more contrast for the active state
- osd active state
2016-03-18 15:44:27 +01:00
Jakub Steiner
4fc5832cfd High Contrast: osd spinbutton fixes
- don't jump around for :backdrop
- only shade focused widgets
2016-03-18 15:30:46 +01:00
Jakub Steiner
c94afa01c4 High Contrast: osd spinbuttons
https://bugzilla.gnome.org/show_bug.cgi?id=763846
2016-03-18 15:22:16 +01:00
Jakub Steiner
a076df852b Hight Contrast: scrollbars
https://bugzilla.gnome.org/show_bug.cgi?id=763797
2016-03-18 13:53:30 +01:00
Olivier Fourdan
3e3d29f7b7 gtkwindow: ignore default size if there is a size request
Some applications set both a default size on their gtk window and a size
request on the corresponding gtk widget.

Until now, the default size was ignored for fixed size windows, so this
had no effect and remained unnoticed, but with the recent change for
client-side decorations, the default size is now used even for fixed size
windows, which can cause the resulting fixed size window to be much
smaller than expected with the size request.

For fixed size windows, if we have both a size request and a default
size set, prefer the size request as before.

https://bugzilla.gnome.org/show_bug.cgi?id=763749
2016-03-17 22:40:42 -04:00
Jakub Steiner
1bf3f40cc5 High Contrast: disabled flat buttons
- disabled flat buttons and backdrop state
2016-03-17 14:57:09 +01:00
Jakub Steiner
09168806a2 High Contrast: fix app-notifications
- get rid of the internal frame

https://bugzilla.gnome.org/show_bug.cgi?id=763781
2016-03-17 13:07:04 +01:00
Jakub Steiner
e942aee13d High Contrast: menubar separator
- set menubar apart form the window content

https://bugzilla.gnome.org/show_bug.cgi?id=763777
2016-03-17 13:00:32 +01:00
Lapo Calamandrei
52c362721c High Contrast: fix titlebuttons sizing
... simplifying the scss in the process.
2016-03-17 12:54:10 +01:00
Lapo Calamandrei
b0a25b3aa9 High Contrast: add undecorated button mixin
... which is used in _common.scss, this fixes flat button not
being, well, flat.
2016-03-17 12:54:10 +01:00
Lapo Calamandrei
981985ee50 High Contrast: remove an adwaita leftover
... a missing mixin which makes no sense in HC actually.
2016-03-17 12:54:10 +01:00
Lapo Calamandrei
4a58e751fb Adwaita: fix wide separators 2016-03-17 10:32:35 +01:00
Matthias Clasen
e9de5f1083 HighContrast: Fix actionbar borders
Make the selector more specific so that it doesn't affect contained
boxes. Copied from Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=763775
2016-03-16 21:57:49 -04:00
Lapo Calamandrei
1ae5643f59 Adwaita: shrink back big standalone osd buttons 2016-03-16 18:06:56 +01:00
Jakub Steiner
3e6eca537b High Contrast: button metrics
- sync with Adwaita for button definitions

https://bugzilla.gnome.org/show_bug.cgi?id=763706
2016-03-16 15:25:28 +01:00
Jakub Steiner
5e629bc26b High Contrast: spinbuttons
- sync with Adwaita

https://bugzilla.gnome.org/show_bug.cgi?id=763696
2016-03-16 15:15:20 +01:00
Jakub Steiner
b73f428a86 High Contrast: circular buttons
- make sure they are visible on selected rows

https://bugzilla.gnome.org/show_bug.cgi?id=763612
2016-03-16 14:53:47 +01:00
Jakub Steiner
e4f6c76cf8 High Contrast: fix entry and button metrics
- sync with Adwaita

https://bugzilla.gnome.org/show_bug.cgi?id=763610
2016-03-16 14:32:14 +01:00
Lapo Calamandrei
6228233a9e Adwaita: remove a nonsensical comment 2016-03-16 13:42:38 +01:00
Lapo Calamandrei
6ccaa8e3ca High Contrast: keycap styling
sync with Adwaita with some styling tweaks.
2016-03-16 13:34:00 +01:00
Lapo Calamandrei
ef8ef299c4 Adwaita: simplify treeview check and radio scss 2016-03-16 13:11:46 +01:00
Jakub Steiner
286437000b High Contrast: fix metrics for popover menus
- ripped the appropriate bits from Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=763609
2016-03-16 12:57:14 +01:00
Jakub Steiner
e5e8ffa3f7 High Contrast: reimplement check and radio
Use a similar structure as Adwaita - using buttons for
radios and checkboxes.

https://bugzilla.gnome.org/show_bug.cgi?id=763707
2016-03-16 12:30:12 +01:00
Timm Bäder
985121813e scale: Fix value height calculation
if (orientation) doesn't make a lot of sense but C doesn't complain and
instead evaluates orientation to TRUE for GTK_ORIENTATION_VERTICAL
(since that's 1), thus inverting the value sizes.
2016-03-16 10:20:17 +01:00
Lapo Calamandrei
6f3a3ea7f3 Adwaita: notebook better header spacing
added some padding to the header and margins to the tabs node when
it's not the only child.
2016-03-15 19:04:21 +01:00
Jakub Steiner
3e567b4900 High Contrast: disabled scales more subtle
Make even the tough border subtle to make it distinct from
normal state.

https://bugzilla.gnome.org/show_bug.cgi?id=763613
2016-03-15 18:28:40 +01:00
Lapo Calamandrei
abfdad3c3d Adwaita: fix progressbar in treeviews styling 2016-03-15 17:02:01 +01:00
Lapo Calamandrei
c6dcc6ee62 Adwaita: add some comments in the GtkScale related scss 2016-03-15 16:13:49 +01:00
Jakub Steiner
87c410d420 High Contrast: checkboxes and radios inside treeviews
- fixes hover state of checkboxes and radios inside treeviews
2016-03-15 15:49:25 +01:00
Jakub Steiner
e44617b351 High Contrast: reimplement gtk scale
- sync with Adwaita to the new box model

https://bugzilla.gnome.org/show_bug.cgi?id=763613
2016-03-15 14:23:56 +01:00
Matthias Clasen
7018a41ce9 Correct a deprecation note
The CSS equivalent for focus-padding is outline-offset.
2016-03-15 09:22:23 -04:00
Jakub Steiner
186ecdf0fa High Contrast: distinct insensitive button
Tone down insensitive buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=746490
2016-03-15 13:25:11 +01:00
Cosimo Cecchi
d61c2b4cce window: stop stomping on resize-mode set by external API
commit c3dc0d80f1 fixed the behavior of
GtkContainer widgets requesting an IMMEDIATE resize-mode.

However, GtkWindow has been stomping on resize-mode during realize()
since commit addcc64b9c. The combination
of factors that led to this not being a visible problem during all this
while is uncertain, but this now causes the Shell to continuously try to
relayout its ShellEmbeddedWindow (a GtkWindow subclass).

This commit separates the resize-mode as set internally by GtkWindow
from the one set with the external API, so that GtkWindow only changes
it when it had not been set before by the subclass.

https://bugzilla.gnome.org/show_bug.cgi?id=763650
2016-03-14 16:10:15 -07:00
Lapo Calamandrei
183276aa65 Adwaita: fix vertical linked spinbuttons
which I broke in a previous commit...
2016-03-14 19:36:12 +01:00
Lapo Calamandrei
32b410c77b Adwaita: more drag hilight fixes 2016-03-14 19:20:15 +01:00
Carlos Garnacho
0b840a04a2 GtkScrolledWindow: Do not hover one scrollbar if grabbing on the other
Makes no sense since we're not going to interact with it. It'll be
hovered eventually if the button is released.
2016-03-14 19:18:14 +01:00
Carlos Garnacho
2173b6d483 GtkScrolledWindow: Check proximity on both indicators on grab-end leave events
The implicit grab may be finished so the pointer lies on top of the other
scrollbar, in this case one scrollbar should lose the hovering state, and
the other should gain it. So we must check for proximity in both indicators.
2016-03-14 19:18:14 +01:00
Lapo Calamandrei
baab1ebcc1 Adwaita: use a green (Tango Chameleon 3) for drag hilight 2016-03-14 18:46:56 +01:00
Lapo Calamandrei
8b505d570e Adwaita: placessidebar dnd fixes 2016-03-14 18:40:31 +01:00
Lapo Calamandrei
bbced9a0cf Adwaita: places sidebar selected button fix and refactor 2016-03-14 17:23:35 +01:00
Carlos Garnacho
160a4fe5ac GtkNotebook: Make tab DnD use application/x-rootwindow-drop again
Besides the ::drag-failed handling in order to trigger the window creation
hook, add some handling of the application/x-rootwindow-drop mimetype, so
the same effect is achieved if the tab could be dropped in a destination
accepting this mimetype.

https://bugzilla.gnome.org/show_bug.cgi?id=763387
2016-03-14 16:16:32 +01:00
Carlos Garnacho
83cc7f76d7 GtkWindow: Make it an application/x-rootwindow-drop destination
This makes toplevels pseudo-transparent wrt this mimetype, so if
the drag source offers this mimetype and not another that was
managed by the destination-side widget hierarchy, the window will
be an acceptable target for this mimetype, allowing it to trigger
whatever is meant to in the source side.

https://bugzilla.gnome.org/show_bug.cgi?id=763387
2016-03-14 16:16:32 +01:00
Lapo Calamandrei
2e39df7713 Adwaita: more scss refactoring 2016-03-14 11:26:32 +01:00
Lapo Calamandrei
0696c848ba Adwaita: refactor entry scss 2016-03-14 10:19:05 +01:00
Matthias Clasen
4f45353a19 pathbar: Style slider buttons
Set a style class on the pathbar slider buttons, and have the
theme handle the separately from other image buttons.
2016-03-13 23:09:47 -04:00
Matthias Clasen
8a3c25ca66 path bar: Stop mishandling slider buttons
We must call get_preferred_width/height on the slider buttons
before allocating them, otherwise the layout machinery spews
warnings.
2016-03-13 23:09:41 -04:00
Matthias Clasen
9a21ff3cd2 stack switcher: Support switching during DND
GtkNotebook will switch pages if you hover over a tab
during DND. The same makes sense in GtkStackSwitcher,
so implement it here.
2016-03-13 00:11:52 -05:00
Lapo Calamandrei
d00e19a3cd Adwaita: some more selector housekeeping 2016-03-12 19:35:56 +01:00
Lapo Calamandrei
ff05ccf18e Adwaita: smarter scss extentions for titlebuttons 2016-03-12 19:32:42 +01:00
Lapo Calamandrei
dfc41b34f7 Adwaita: smarter scss extentions on the notebook
avoiding spawning unneeded selectors.
2016-03-12 19:26:52 +01:00
Lapo Calamandrei
2885f1b3a2 Adwaita: fix notebook overflow arrows styling
which correctly go :active now, istead of :checked as in the past.
2016-03-12 19:02:48 +01:00
Lapo Calamandrei
e44ea315d5 Adwaita: set back drag hilight color to black
...I erroneusly pushed a test green there, this will probably
change again, but that green wasn't right.
2016-03-12 15:27:53 +01:00
Lapo Calamandrei
8003937a68 Adwaita: textview drag hilight 2016-03-12 15:22:35 +01:00
Lapo Calamandrei
b46f7223ac Adwaita: scss cosmetic fixed 2016-03-12 15:03:07 +01:00
Lapo Calamandrei
39c8ad53b5 Adwaita: reset filechooserbutton:drop(active) 2016-03-12 14:21:21 +01:00
Matthias Clasen
d345a7a60e color editor: Improve popup positioning
Don't make the popup follow the slider while it is open; that
makes interaction with it unnecessarily hard. Also move all the
popups inwards a little bit, so they are not flush with the
scales, which looks untidy.

https://bugzilla.gnome.org/show_bug.cgi?id=763380
2016-03-11 22:44:17 -05:00
Matthias Clasen
5f00a9b4ec scrolled window: Fix scrollbar size allocation
We were not taking the scrollable borders into account when
requesting size for the scrolled window, which could lead
to underallocating the scrollbars at size allocation time
when we *did* take the borders into account.

This is most notable with treeviews, where we have the
headers as borders, and was causing the treeview-crash-too-wide
reftest to fail.
2016-03-11 21:42:33 -05:00
Matthias Clasen
07e6eae3e5 file chooser button: Set a CSS name
This lets us differentiate the main node from regular boxes.
2016-03-11 21:42:33 -05:00
Matthias Clasen
2f4f164078 Fix a typo
We don't want to get the padding twice.
2016-03-11 16:38:41 -05:00
Matthias Clasen
5e68c4e62d inspector: Reset the treewalk when required
The tree walk holds a tree iter, which will become invalid
when we either remove the row that it points to or remove
all rows.

Reset the tree walk in those cases to avoid a crash that
was pointed out by Bastien Nocera.
2016-03-11 13:53:57 -05:00
Matthias Clasen
2e34ce8f7c inspector: Add api to get the current tree walk position
This will be used in the next commit.
2016-03-11 13:53:57 -05:00
Matthias Clasen
a6d575ed61 typo fix 2016-03-11 13:53:57 -05:00
Timm Bäder
4b0abc13e3 range: Fix a few typos
Depreacated -> Deprecated
through -> trough
2016-03-11 19:18:07 +01:00
Sebastien Lafargue
09b837183e textview: Fix drag highlight problems 2016-03-11 19:14:16 +01:00
Matthias Clasen
63b03ce836 Better debug messages for actions
Unify the debug messages between actionhelper and menutracker,
and add some more context to some of them.
2016-03-11 12:20:33 -05:00
Lapo Calamandrei
3c89c11328 Adwaita: set a min-width on horizontal spinbutton entry
to accomodate at least 3 chars, before overflowing.
2016-03-11 18:02:37 +01:00
Lapo Calamandrei
5085e1c70d Adwaita: rounded corners for colorscale popup 2016-03-11 18:01:36 +01:00
Benjamin Otte
eeb945e4c1 inspector: Widgets update automatically when CSS changes
There's no need to force-invalidate their CSS.
2016-03-11 17:00:41 +01:00
Benjamin Otte
b7285592f9 cssanimation: Compute progress correctly
We were computing the wrong progress, in particular when the iteration
count was non-integer.

Test included.
2016-03-11 16:39:34 +01:00
Benjamin Otte
fc7335bdb4 colorscale: Draw a trough
Make sure the color info is actually drawn inside the trough.
2016-03-11 16:39:34 +01:00
Lapo Calamandrei
8351a6e4d6 Adwaita: .osd check|radio style 2016-03-11 16:35:16 +01:00
Lapo Calamandrei
b37e4ff805 Adwaita: simplify vertically linked entries scss code 2016-03-11 14:57:03 +01:00
Matthias Clasen
4c3e4d3ea1 filechooserbutton: Fix drag highlight problems
This widget is a bit unusual in that it is a box that acts as
the drop target, while the visible content is a child of the box.
Propagate :drop(active) to the child to make the highlight visible.
2016-03-11 08:51:50 -05:00
Lapo Calamandrei
e8c5db0425 Adwaita: drop active style fixes
taking care of:
* entries
* buttons (misses some linking logic still)
* comboboxes (untested)
* spinbuttons
2016-03-11 14:44:58 +01:00
Matthias Clasen
ab5ebf6199 calendar: Fix drag highlight problems
Don't propagate :drop(active) to components.
2016-03-11 08:34:01 -05:00
Matthias Clasen
3064e4e406 spinbutton: Fix drag highlight problems
Don't propagate :drop(active) to the buttons.
2016-03-11 08:07:30 -05:00
Matthias Clasen
2fee5fbda7 entry: Fix drag highlight problems
We don't want drag highlights around icons or progress, so don't
propagate the :drop(active) state to them.
2016-03-11 08:02:10 -05:00
Matthias Clasen
1d19065979 range: Fix trough clickability
We previously considered any click inside the trough if it
hit an area that the slider might cover. Bring this behavior
back; the trough of scales is otherwise just too narrow to
hit easily with a click.
2016-03-11 01:27:21 -05:00
Matthias Clasen
1a5cb41bd9 Use per-display debug flags for visual debugging 2016-03-11 00:22:36 -05:00
Matthias Clasen
02742d5332 Make debug flags per-display
Tihs lets us toggle debug flags in the inspector without affecting
the inspector itself.
2016-03-11 00:22:36 -05:00
Matthias Clasen
f82e4ff362 Trivial formatting fix 2016-03-11 00:22:36 -05:00
Matthias Clasen
97250ea5e6 inspector: Add a switch for the layout debug flag 2016-03-11 00:22:36 -05:00
Matthias Clasen
ad54697594 gadget: Show layout
When the layout debug key is set, overlay boxes for the content
and border area of each gadget.
2016-03-10 23:21:22 -05:00
Matthias Clasen
33d7196dc8 Add a layout debug option
This will be used to show box model borders.
2016-03-10 23:21:22 -05:00
Matthias Clasen
804d330195 Typo fixes
Fix s/occurence/occurrence in many places.
2016-03-10 22:46:02 -05:00
Federico Mena Quintero
edacd5d6ee GtkFileChooserEntry: move the cursor after the user chooses a completion from the list
https://bugzilla.gnome.org/show_bug.cgi?id=756450
2016-03-10 16:03:52 -06:00
Federico Mena Quintero
81059c35d5 GtkFileChooserEntry: regenerate the completions if the dir_part changes
Consider this bug:

1. Open a file chooser; switch it to $HOME

2. Start typing "~/Dow" with some file that *does* exist in your $HOME

3. Delete the inline-completion selection (e.g. the "nloads" after "~/Down").

4. While you are at "~/Dow_" hit Tab.  No completion will occur.

This happens because of the following.

Say the GtkFileChooserEntry is in the process of loading $HOME,
because _set_base_folder() was called.  If the entry contains no text,
then the FULL_PATH_COLUMN of the file system model will be set to
unprefixed filenames from $HOME, like

  .ssh/
  Documents/
  Downloads/
  somefile.txt

Later we avoid reloading the folder if g_file_equal(old_folder, new_folder).

However, the FULL_PATH_COLUMN gets populated in completion_store_set()
out of the actual filenames that GIO returned, plus the chooser_entry->dir_part.

If the user starts typing "~/Dow" then dir_part changes to "~/", *but*
the folder won't be reloaded since it is also $HOME.  However, the completion
machinery assumes that FULL_PATH_COLUMN will contain prefixed entries like

  ~/.ssh/
  ~/Documents/
  ~/Downloads/
  ~/somefile.txt

So, we add an invariant that chooser_entry->dir_part and
chooser_entry->current_folder_file must change at the same time, and
must not get out of sync:  If any of them changes, then the
completions are regenerated.
2016-03-10 15:37:00 -06:00
Matthias Clasen
2b773e07e3 inspector: Show the frame clock in misc
There is no convenient way to get a handle on the frame clock,
otherwise, and the frame clock object is where we show the frame
rate...
2016-03-10 16:21:35 -05:00
Lapo Calamandrei
85d0220800 Adwaita: gtkcolorscale styling. 2016-03-10 13:35:46 +01:00
Matthias Clasen
30faa9a2a9 inspector: Refine strv editor
Put some spacing between the rows, and link the buttons to
the entries they belong to.
2016-03-09 21:59:43 -05:00
Matthias Clasen
6e9fd6832a inspector: Do a better job with readonly properties
Say if they are non-writable or construct-only, and also
gray out construct-only properties in the list.
2016-03-09 21:59:43 -05:00
Matthias Clasen
a28e76f09c GtkActionable: Improve property names
These names show up as title in the property editor
in the inspector, so we want them to look consistent
with the rest.
2016-03-09 21:59:43 -05:00
Matthias Clasen
c24cc63523 inspector: Minor refactoring
Break out some functions in prop-editor.c
2016-03-09 21:59:43 -05:00
Matthias Clasen
c1c8a861aa inspector: Redo property lists a bit
Break out value types as a separate column, to make the
value column more readable.
2016-03-09 21:59:43 -05:00
Matthias Clasen
0c929b7124 inspector: Avoid overflow when editing doubles
The adjustment double properties allow values from -G_MAXDOUBLE
to G_MAXDOUBLE, which leads to overflow when calculating
max - min / 10. To avoid that, simply use a fixed page_size of 1.0.
2016-03-09 21:59:43 -05:00
Matthias Clasen
6af8e9f3cc inspector: Wording changes
Align the property nicks of GtkCssNode with the column names
in the inspector node tree.
2016-03-09 19:29:58 -05:00
Matthias Clasen
f23c77b14b inspector: Some more cleanup
The last commit left some unused functions behind.
2016-03-09 19:29:58 -05:00
Matthias Clasen
e5a5f0a59a inspector: Remove an unncessary context menu
Now that we have the style properties on the same page again,
we don't need the context menu anymore.
2016-03-09 19:29:58 -05:00
Matthias Clasen
fa48dbf1a5 range: Fix gadget state propagation
The contents node was not getting state updates at all, and the
trough node was missing some state updates as well, because we
were not calling update_trough_state() in all the places where
it is needed.
2016-03-09 14:15:40 -05:00
Lapo Calamandrei
1879de1f17 Adwaita: radiobutton and checkbutton style fixes
padding and margins tweaks and treat the hover when placed in
popovers.
2016-03-09 17:29:46 +01:00
Timm Bäder
25b67af340 textview: Ensure the borders fit into the allocation
https://bugzilla.gnome.org/show_bug.cgi?id=763216
2016-03-09 16:46:00 +01:00
Lapo Calamandrei
473e346203 Adwaita: added a border to sidebars...
...hopefully when needed.
By default I assume a left hand side placement on ltr languages
and the opposite in rtl, for other placements left/right style
classes can be used.
2016-03-09 15:38:03 +01:00
Matthias Clasen
ed5468e81c window: Avoid excessive resizing with popovers
Under Wayland, popovers use subsurfaces, and we end up getting
configure events for these delivered to the toplevel they're in.
To avoid triggering resize loops, ignore configure events that
are not for the toplevel window itself.

https://bugzilla.gnome.org/show_bug.cgi?id=763351
2016-03-09 08:58:23 -05:00
Lapo Calamandrei
9ab920164a Adwaita: regenerate css
since a bit was missing from the previous commit
2016-03-08 20:39:24 +01:00
Lapo Calamandrei
8508ea1554 Adwaita: add a top border to actionbars 2016-03-08 20:09:18 +01:00
Lapo Calamandrei
5923b73fc1 Adwaita: make links on infobars visible 2016-03-08 19:56:33 +01:00
Lapo Calamandrei
6fdf1e4462 Adwaita: path-bar style fixes
what we used to do here doesn't really work anymore, so this adapt
to gtk+ and theme changes.
2016-03-08 16:08:24 +01:00
Lapo Calamandrei
01ad22df1f Adwaita: vertical paddings on menu
mostly to fix combobox menu positioning, looks nice anyway.
2016-03-08 14:27:24 +01:00
Lapo Calamandrei
1f3c93583a Adwaita: fix a typo 2016-03-08 14:00:01 +01:00
Matthias Clasen
13a94b66b6 Sync default double-click time with GNOME
The default value for the double-click key in the
org.gnome.settings-daemon.peripherals.mouse schema is 400.
Use the same value as the declared default for the
gtk-double-click-time GTK+ setting, to avoid pointless
differences in corner cases.

https://bugzilla.gnome.org/show_bug.cgi?id=720950
2016-03-07 07:50:29 -05:00
Matthias Clasen
aa193ce4a4 inspector: UI refresh
The sidebar in the object page was using up more space than it deserves.
Replace it with a combo box in the subheader. Now that we have more space,
put the CSS node tree and the style properties in the same page again.
2016-03-07 00:24:15 -05:00
Matthias Clasen
4b5bcdeaa5 inspector: Drop the per-object CSS editor
The global editor is good enough for all uses.
2016-03-06 21:41:46 -05:00
Cosimo Cecchi
9509bbb4a1 range: remove unneeded gtk_widget_queue_draw() 2016-03-06 11:10:44 -08:00
Cosimo Cecchi
c4615eff7b range: rename function
The function queues an allocation now, not a draw.
2016-03-06 11:10:44 -08:00
Cosimo Cecchi
de1c4bad6f range: remove duplicated code
This is already called by range_grab_add().
2016-03-06 11:10:44 -08:00
Cosimo Cecchi
d9db329496 scale: trivial code cleanup 2016-03-06 11:10:44 -08:00
Cosimo Cecchi
f294bdc803 scale: deprecate value-spacing style property
Nothing uses it now.
2016-03-06 11:10:44 -08:00
Cosimo Cecchi
a9b50b6f69 scale: port scale values to gadgets
And add a default color like it was before.
This also fixes other issues with scale values interacting with scale
mark labels, which were buggy at least since 3.18.
2016-03-06 11:09:46 -08:00
Matthias Clasen
94f0cef6fc Minor documentation improvement
https://bugzilla.gnome.org/show_bug.cgi?id=583780
2016-03-06 10:23:49 -05:00
Matthias Clasen
4ab91f09cf spin button: Limit the entry width to reasonable values
When opening the value editor for any GtkAdjustment properties
in the inspector, the popover stretches out for miles, since
it reserves enough space to draw MAXDOUBLE. This is not useful.
Limit the space we reserve to 8 digits.
2016-03-05 23:45:35 -05:00
Matthias Clasen
9c0e4c174a builder: Allow 'primary' as a modifier value
Support aliases for flags values in GtkBuilder, and use this
to support the special value 'primary' for GdkModifierType
values.

https://bugzilla.gnome.org/show_bug.cgi?id=699891
2016-03-05 23:44:03 -05:00
Cosimo Cecchi
27a6183b98 range: simplify calculation 2016-03-05 19:09:18 -08:00
Cosimo Cecchi
8242182404 range: move declarations to inner block
Where they're needed.
2016-03-05 19:09:18 -08:00
Cosimo Cecchi
990bd03c35 range: use a fixed offset for mark "snap" size
Instead of making it dependent on the slider size.
2016-03-05 19:09:18 -08:00
Cosimo Cecchi
6efe1f411a Revert "range: use border box for slider area"
Since it causes problems with event coordinates.

This reverts commit 0883ff5eed.
2016-03-05 19:09:18 -08:00
Cosimo Cecchi
31fd41e547 Adwaita: fix glitch in fine-tune scrollbar theming
The fine-tune mode should not change the overall dimensions of the
scrollbar.
2016-03-05 12:05:26 -08:00
Matthias Clasen
434b08fe24 status icon: Prevent size dithering
We're seeing loops where the size of some status icons constantly
dithers between 24 and 25. Since I couldn't track down exactly
where the one extra pixel comes from, just stop reacting
to single-pixel size changes.

https://bugzilla.gnome.org/show_bug.cgi?id=758893
2016-03-05 12:15:42 -05:00
Matthias Clasen
251810ff40 inspector: Avoid pointless selections
The CSS selector and the class hierarchy are purely
informative, no need to select anything here.
2016-03-05 00:35:08 -05:00
Matthias Clasen
e69c1c5a9b inspector: More grid lines
I had forgotten the css property list.
2016-03-05 00:34:39 -05:00
Matthias Clasen
360bad6865 inspector: Some ui refinements
Remove pointless expanders from lists, add grid lines and,
in some places, tree lines.
2016-03-05 00:29:06 -05:00
Matthias Clasen
2b1fc6166c a11y: Expose window type hint as attribute
This was an old request, maybe still useful.

https://bugzilla.gnome.org/show_bug.cgi?id=468122
2016-03-04 23:50:50 -05:00
Matthias Clasen
92662828ba messagedialog: Respect the gtk-keynav-use-caret setting
We used to always make the labels in message dialogs selectable,
which is a bit problematic wrt. to keynav - the label can
unexpectedly 'turn blue', which irritates some people.

With the new gtk-keynav-use-caret setting, we can now only
make the labels selectable when it is required for accessibilty
reasons.
2016-03-04 22:44:30 -05:00
Matthias Clasen
5c0b589acd text view: Respect gtk-keynav-use-caret
When the gtk-keynav-use-caret setting is TRUE, make the cursor
visible regardless of the cursor-visible property.
2016-03-04 22:44:29 -05:00
Matthias Clasen
c9371f6a18 Add a gtk-keynav-use-caret mode setting
For accessibility reasons, it is useful to have a global setting
that makes carets visible in all text.

https://bugzilla.gnome.org/show_bug.cgi?id=602526
https://bugzilla.gnome.org/show_bug.cgi?id=762799
2016-03-04 22:43:24 -05:00
Cosimo Cecchi
f3e068bb31 range: avoid setting slider coordinates to negative numbers
This can happen if the theme sets a negative margin, but the coordinate
should never be negative.
2016-03-04 18:13:53 -08:00
Cosimo Cecchi
fce344d31f range: factor out a function
We're going to modify this in the next commit.
2016-03-04 18:13:53 -08:00
Matthias Clasen
b84cf5f349 tool button: Update style classes
When changing tool button contents according to the toolbar-style
property, we need to update the style classes to ensure that the
visual style matches.

https://bugzilla.gnome.org/show_bug.cgi?id=760560
2016-03-04 20:50:21 -05:00
Cosimo Cecchi
5a42c2e478 range: fix warning for gadget slider
The slider is not HFW/WFH - just pass -1 to get rid of the warnings.
2016-03-04 17:28:53 -08:00
Olivier Fourdan
cdc580463e gtkwindow: default size with fixed size windows
Allow fixed size windows with a default size to grow or shrink as the
content requires, but not smaller than the given default size.

https://bugzilla.gnome.org/show_bug.cgi?id=762974
2016-03-04 20:17:50 -05:00
Ray Strode
046a4a6e0f gtkapplication-dbus: use application id instead of prgname for SM
gnome-session takes an "app id" for client and inhibitor registration,
This app id is supposed to be a desktop file id (complete with the
.desktop extension), but gtk+ currently uses g_get_prgname ().

This commit changes gtkapplication to use the application id instead,
which is a much more natural fit.  gnome-session is going to be updated
to stop using the .desktop extension, too, so everything is consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=763106
2016-03-04 20:17:26 -05:00
Carlos Soriano
fdde27ea9c gtkplacessidebar: add new other locations with flags signal
We weren't using the open flags on the other locations signal, which
makes impossible for applications like nautilus to act in the same
way that for any other location where the user can choose between
opening in the current view, in a new window or in a new tab.

Add a new signal with an open flags parameter and deprecate
the other-location signal.

https://bugzilla.gnome.org/show_bug.cgi?id=754743
2016-03-04 20:15:52 -05:00
Carlos Soriano
fec0c4c201 Revert "gtkplacessidebar: add open flags to other locations"
This reverts commit 63a204e1c5 since it broke the API.
We will add a new signal instead in an upcomming patch.

https://bugzilla.gnome.org/show_bug.cgi?id=754743
2016-03-04 20:15:52 -05:00
Lapo Calamandrei
303fdfbe8b Adwaita: treeview column header scrollbar top border
add a top border in vertical scrollbars in treeviews.
2016-03-05 02:10:24 +01:00
Lapo Calamandrei
eef3153265 Adwaita: shrink scroolbars
erroneusly pushed 15px scrollbars with the previous commit, back
to 13px now.
2016-03-05 02:01:16 +01:00
Lapo Calamandrei
035ce8f18d Adwaita: fix a typo 2016-03-05 01:50:18 +01:00
Lapo Calamandrei
0c987f94c8 Adwaita: scrollbar style rewrite
works correctly with the new gadgettified GtkRange Cosimo nicelly
delivered, as a bonus steppers are styled for overlay indicator
usage as well.
2016-03-05 01:39:13 +01:00
Cosimo Cecchi
7ff2f451ce range: add positional style classes to fill/highlight
Requested by Lapo.
2016-03-04 11:57:31 -08:00
Olivier Fourdan
adcd1ce2d3 gtkwindow: windows with a fixed size can shrink
One important aspect of non-resizable windows that we need to preserve
is that they shrink when their content requires less size.

Previous changes to allow the default size to be applied to fixed size
windows would have prevented all fixed size windows from shrinking when
their content requires less size.

Allow shrinking for fixed-size windows unless a default size was
specified.

https://bugzilla.gnome.org/show_bug.cgi?id=762974
2016-03-04 14:35:23 -05:00
Lapo Calamandrei
59badc320e Adwaita: shrink back scale trough
like it was before the GtkRange gadgettification.
2016-03-04 20:09:16 +01:00
Matthias Clasen
4d2e7a0314 gadget: Add more details to warning
All the other warnings in this file include the css node name
and the gadget owners type. Be consistent about this.
2016-03-04 13:56:26 -05:00
Matthias Clasen
51b83c4389 gadget: Warn if for_size is too small
It does not make sense to pass a for_size into the size allocation
machinery that is smaller than the min-size in that direction.
Warn if it happens, so we can track it down when it occurs.
2016-03-04 13:43:19 -05:00
Lapo Calamandrei
54858574a3 Adwaita: really fix scale with marks
added a min-height/width compensation too when in fine-tune mode,
so scale with marks and no labels doesn't make the scale node grow
when in fine-tune.
2016-03-04 19:18:43 +01:00
Ray Strode
50598ee08f gtk-launch: add hack to close up dbus-daemon race
If gtk-launch exits before the program it starts fully activates,
then the dbus-daemon may avoid doing the activating method call.

This commit works around the problem by pinging the activated
application, and waiting for a reply.

This is similar to the gvfs-open bug here:

    https://bugzilla.gnome.org/show_bug.cgi?id=746534

https://bugzilla.gnome.org/show_bug.cgi?id=763103
2016-03-04 12:42:37 -05:00
Lapo Calamandrei
88d51a8604 Adwaita: fix a thinko wrt fine-tune scales
added a scale node padding compensation for the trough growth in
fine-tune mode, so now the scale node doesn't grow anymore when
mark labels are present.
2016-03-04 18:36:36 +01:00
Matthias Clasen
7382f3c347 icon helper: Properly update on style change
A GtkCssChange of NULL means 'everything changed!'.
2016-03-04 08:50:52 -05:00
Matthias Clasen
6b2cde94b4 entry: Make progress node invisible when appropriate
We were failing to do that, leading to progress not disappearing
anymore after it was initially shown, in the gtk3-widget-factory
entry progress example.
2016-03-04 08:04:45 -05:00
Cosimo Cecchi
757b74bed9 Adwaita: fix thinko in fine-tune scale selector
Marks always get class top/bottom, regardless of the scale orientation.
2016-03-03 22:06:16 -08:00
Matthias Clasen
763daf4420 expander: Reinstate rtl allocation behavior
In rtl mode, we must not just reverse the children,
but also allocate from the right. Use the newly introduced
box gadget api to achieve this.

https://bugzilla.gnome.org/show_bug.cgi?id=762945
2016-03-03 21:28:51 -05:00
Matthias Clasen
c48f0d6f8b check button: Reinstate rtl allocation behavior
In rtl mode, we must not just reverse the children,
but also allocate from the right. Use the newly introduced
box gadget api to achieve this.

https://bugzilla.gnome.org/show_bug.cgi?id=762945
2016-03-03 21:28:51 -05:00
Matthias Clasen
c581259e06 box gadget: Add a way to allocate in reverse
This is needed to preserve expected allocation behavior
in rtl mode.
2016-03-03 21:28:51 -05:00
Timm Bäder
e2e330db1a revealer: Don't use TRANSITION_NONE for disabled animations
If animations are disabled, the only difference we need to make is that
we don't have to start the transition. Size requests should remain the
same.

https://bugzilla.gnome.org/show_bug.cgi?id=762996
2016-03-03 18:54:09 +01:00
Lapo Calamandrei
8b6603bbd6 Adwaita: fix a thinko about toolbar items spacing with margins 2016-03-03 18:02:43 +01:00
Olivier Fourdan
4a729dc233 gtkwindow: Fix regression with fixed size windows
Previous commit to address the default size introduced a regression
with fixed size windows if no default size was given, the resulting
window would end up much smaller than its actual content.
2016-03-03 17:50:19 +01:00
Lapo Calamandrei
08613dce92 Adwaita: uniform paddings on image-buttons
fixes https://bugzilla.gnome.org/show_bug.cgi?id=762811
2016-03-03 16:12:20 +01:00
Lapo Calamandrei
3549490aa8 Adwaita: use margin for spacing widgets on toolbars
kind of a workaround, this approach is pretty unmaintainable, I
hope we'll get a CSS property for spacing directly on the parent
container (a toolbar in this particular case).
See https://bugzilla.gnome.org/show_bug.cgi?id=762397
2016-03-03 16:01:46 +01:00
Olivier Fourdan
0f95472581 gtkwindow: Use default size even if not resizable
If a window is not resizable (with gtk_window_set_resizable ()),
the size given with gtk_window_set_default_size() is ignored.

The solution to this would be to use gtk_widget_set_size_request() but
that's a GtkWidget API and therefore does not take into account the
client side decorations when in use with GtkWindow.

Refactor the code so that gtk_window_set_default_size() (which is a
GtkWindow API) gives the expected result on non-resizable windows as
well.

bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=762974
2016-03-03 09:13:32 +01:00
Руслан Ижбулатов
7eb9f5f8ef W32: Prefer CSD by default
Will make GTK+ more willing to use CSD for all normal windows without
being asked to. Lack of desktop composition will, of course, prevent
it from using CSD (in theory).

GTK_CSD=0 will force CSD to NOT to be used whenever
possible (i.e. in cases where CSD is not specifically requested
by a window, by design).

https://bugzilla.gnome.org/show_bug.cgi?id=759899
2016-03-03 07:41:06 +00:00
Cosimo Cecchi
8ebc03a1d1 range: use border allocation for gadget hit test
The border is typically part of the reactive part of the widget. This
matches the pre-gadget behavior.
2016-03-02 22:23:11 -08:00
Matthias Clasen
0b156ea096 Document the .circular style class 2016-03-02 19:12:10 -05:00
Cosimo Cecchi
1395f3a838 scrolledwindow: fix left/right thinko for scrollbar style classes
"left" and "right" were inverted, preumably because the position type
parameter refers to the scrolled window position, and not the scrollbar
itself.
2016-03-02 16:08:19 -08:00
Benjamin Otte
3e06942847 widget: Add brute force method to propagate clip
When a gtk_widget_queue_allocate() on some widget increases the clip,
widget->parent's clip was not updated. This appraoch naively just
unions widget's new clip with widget->parent's clip.

This of course only works if widget and parent share the same GDK
window. In the cases where they don't we can't do anything and need a
better fix.

Fixes label-text-shadow-changes-modify-clip.ui reftest.
2016-03-03 00:43:59 +01:00
Lapo Calamandrei
76ea3a15cb Adwaita: more scale style fixes 2016-03-02 23:10:26 +01:00
Lapo Calamandrei
597151c736 Adwaita: fix scale with marks size 2016-03-02 21:54:19 +01:00
Lapo Calamandrei
fde1aac57a Adwaita: scale with marks style fixes
after GtkRange gadgettification the theme needs some adjustments
for the new widget structure.
2016-03-02 21:35:38 +01:00
Matthias Clasen
4a5801b902 combobox: Correct the CSS node docs
The box was somehow overlooked in the diagrams.
2016-03-02 15:20:47 -05:00
Lapo Calamandrei
d3ca8aaf83 Adwaita: fix combos styling
since now the combobox childrens are in a box.
2016-03-02 20:55:19 +01:00
Cosimo Cecchi
b1144a73de scale: don't add scale label for empty markup
This is a regression from the gadget port.
2016-03-02 11:17:08 -08:00
Benjamin Otte
89121e058a win32 theme: Add a naive switch implementation
I couldn't come up with anything better than a button on a button.
But the Windows theme sucks...
2016-03-02 14:49:37 +01:00
Benjamin Otte
8e3bc96d78 win32 theme: Implement horizontal spinbuttons 2016-03-02 14:49:37 +01:00
Benjamin Otte
222c43fc60 combobox: Put child into box
Put the combobox child into the box we added for this purpose. That way,
we don't have to maintain the child's position ourselves anymore.
2016-03-02 13:54:39 +01:00
Benjamin Otte
a380533336 container: Remove check
The check is not working for many containers anymore as they are not the
direct parents of their children. We want to allow this behavior in more
places.
2016-03-02 13:54:39 +01:00
Benjamin Otte
c3d3bf61e4 combobox: Put the button in a box
This is so we can put the entry into the box in the next commit.
2016-03-02 13:54:39 +01:00
Benjamin Otte
04d9577cb7 combobox: Make sure the cellview expands
Windows theme needs the expansion for correct drawing of the focus
outline.
2016-03-02 13:54:39 +01:00
Benjamin Otte
13b320ecb2 combobox: Ensure an entry gets created for has_entry combos
Previously add/remove on the combobox would result in a cellview being
created.
2016-03-02 13:54:39 +01:00
Matthias Clasen
956b2ff998 progressbar: Don't leave css nodes behind
We create and destroy gadgets inside the hierarchy here,
and if we don't explicitly remove their CSS nodes from the parent,
they stick around.
2016-03-01 16:00:54 -05:00
Matthias Clasen
577783a19d scale: Don't leave css nodes behind
We create and destroy gadgets inside the scale hierarchy here,
and if we don't explicitly remove their CSS nodes from the parent,
they stick around.
2016-03-01 15:58:21 -05:00
Cosimo Cecchi
5889d2520f Adwaita: fix outline for scale trough 2016-03-01 12:54:01 -08:00
Matthias Clasen
cb614cc838 range: Don't leave css nodes behind
We create and destroy gadgets inside the range hierarchy here,
and if we don't explicitly remove their CSS nodes from the parent,
they stick around.
2016-03-01 15:48:01 -05:00
Matthias Clasen
37007c47a5 level bar: Don't leave css nodes behind
We create and destroy gadgets inside the levelbar hierarchy here,
and if we don't explicitly remove their CSS nodes from the parent,
they stick around.
2016-03-01 15:35:32 -05:00
Matthias Clasen
87e71afd50 cell renderer: Strip out :drop(active) state
It does not make sense to render every cell in a treeview as
drop target, even when the treeview itself is set as a drop destination.

https://bugzilla.gnome.org/show_bug.cgi?id=761686
2016-03-01 15:18:34 -05:00
Matthias Clasen
eff97fd55f Take a reference on the im context for async ops
This might fix the crash in yelp that some people continue
to see.

https://bugzilla.gnome.org/show_bug.cgi?id=762887
2016-03-01 07:59:15 -05:00
Benjamin Otte
61f5562f9f notebook: Tell everyone we reordered stuff
Fixes keybindings for reordering actually emitting signals and properly
updating CSS/the screen.
2016-02-29 23:17:00 +01:00
Benjamin Otte
a74bb0dec4 notebook: Reallocate tab gadgets when we reorder them
Otherwise they stay in their position and don't cause a redraw. Which
really confuses Epiphany users apparently.

https://bugzilla.gnome.org/show_bug.cgi?id=762720
2016-02-29 22:00:03 +01:00
Cosimo Cecchi
d000b212c6 range: fix fill level for vertical inverted scales 2016-02-29 12:53:08 -08:00
Cosimo Cecchi
5a83787dc0 Update CSS nodes documentation 2016-02-29 10:45:14 -08:00
Cosimo Cecchi
bb55a1a958 scale: add gadgets for indicator/label in scale marks
This will allow us to theme them indepdendently, and specify a size for
the indicator from the theme.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
7bd3d87eeb scale: add a gadget for every mark
We want to add another gadget for the mark indicator. This will allow us
to do so.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
74a8bbfd38 Adwaita: add minimum size for marks
It's still suboptimal, because there's no way to control the size of the
indicator alone, but this does the job for now.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
0fb50dc9a8 gadget: improve debug message 2016-02-29 10:45:14 -08:00
Cosimo Cecchi
0c8dbf07ce range: draw slider on top of all contents
This is so that e.g. the focus ring is drawn under the slider.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
cdd7a7bdcd scale: implement rendering for marks gadgets
This completes the conversion of scale marks to gadgets.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
1a8eb9fefa scale: implement size allocate for mark gadgets
This allows to move the mark sections around with e.g. margins.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
562a501f3b scale: port marks size request to gadgets 2016-02-29 10:45:14 -08:00
Cosimo Cecchi
2f420d0e14 scale: use gadgets instead of nodes for mark containers
The gadget is not yet allocated though.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
b73d274d55 scale: rename function arguments
To make them clearer. No functional change here.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
8d5d16ae56 scale: remove unused argument
It's always GTK_POS_TOP.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
bc41ff8af4 range: better hack for GtkColorScale
Just draw the slider, since that is the only thing GtkColorScale cares
about.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
887b6d65a1 range: deprecate gtk_range_get/set_min_slider_size()
Nothing uses these functions inside GTK anymore.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
424f17c0fb range: don't use gtk_range_set_min_slider_size()
The way this method is used from the GtkRange subclasses doesn't really
work well when the slider properties change as a consequence of e.g. a
style class being applied (e.g. the fine-tune style class).

In fact, there's no need to read the minimum slider size out of band,
and we can obtain the same result in a way that always work by setting a
private property on GtkRange.
2016-02-29 10:45:13 -08:00
Lapo Calamandrei
0468ff1545 Adwaita: some more WIP theme work for the new scale 2016-02-29 10:45:13 -08:00
Cosimo Cecchi
3ff66edb6b gadget: simplify code 2016-02-29 10:45:13 -08:00
Cosimo Cecchi
0883ff5eed range: use border box for slider area
Since we can use negative margins, we should not use the margin box
for the slider area. Use the border box instead, since that's what is
typically mapped to the visible area.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
6ecab5ee6b range: use new GtkCssGadget API instead of rolling our own 2016-02-29 10:45:13 -08:00
Cosimo Cecchi
44178c0541 gadget: add API to get various area boxes
Compared to the function returning the allocation, these will return the
box in gadget coordinates.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
2d2a81682d range: simplify code
Instead of directly accessing the widget allocation, we can use the
gadget API to test whether the coordinates are in the main gadget.
2016-02-29 10:45:13 -08:00
Lapo Calamandrei
622f5aef4e Adwaita: WIP for new range theme 2016-02-29 10:45:13 -08:00
Cosimo Cecchi
d1433c25f3 range: add a gadget for the whole widget area
This commit introduces another node, called "contents", that holds the
main contents of the range. This allows for the main gadget itself to
span across the whole surface of the widget now.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
a9ea544f3d scale: always add marks at the beginning or the end
Marks are always either the first or the last child of the scale.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
1d047f0097 range: use new GtkBoxGadget API instead of counting children 2016-02-29 10:45:13 -08:00
Cosimo Cecchi
6370d6cb27 boxgadget: add APIs to insert gadgets next to siblings 2016-02-29 10:45:13 -08:00
Cosimo Cecchi
6401e2405e range: use new GtkBoxGadget API instead of removing/inserting 2016-02-29 10:45:13 -08:00
Cosimo Cecchi
06776d3d2f boxgadget: add API to set expand/align flags for gadget child 2016-02-29 10:45:13 -08:00