Instead of using "Monospace", pick the users configured monospace font
name up from GConf. (This is a nice touch, but is more done here to
demonstrate that we can do it rather than for any great utility.)
* Style aspects like colors and fonts are moved into gnome-shell.css.
* Scrolling is adding using NbtkScrollView.
Based on a patch from Colin Walters
https://bugzilla.gnome.org/show_bug.cgi?id=591245
Add clutter-text properties to allow getting access to the underlying
ClutterText actor. This corresponds to the get_clutter_text() methods.
The PROP_LABEL and PROP_ENTRY enum values are renamed to PROP_TEXT to
match the names of the properties that they correspond to, and the
properties of NbtkEntry are reordered into alphabetical order.
Based on a patch from Colin Walters
https://bugzilla.gnome.org/show_bug.cgi?id=591245http://bugzilla.moblin.org/show_bug.cgi?id=6313
NbtkBoxLayout: Make consistent that the area scrolled and clipped
to is the content area (excluding borders and padding.) Translate
back appropriately when chaining up so that the parent background
is drawn at the right place and picking on the box (if it's reactive)
picks at the right place on the screen.
clip-to-allocation is removed from NbtkScrollView since it's just
not right - if the child has any non-moving elements, like headers or
borders, it will need to set a narrower clip. And even if the entire
child scrolls, we want to clip to an arrow that excludes the scrollbars.
NbtkBoxLayout provides the basic functionality of 2-dimensional
scrolling and we don't use NbtkViewport anywhere, so remove it.
This avoids fixing NbtkViewport up for the interaction of scrolling
and borders/padding, which would be a little involved and require
a test program for NbtkViewport to be written.
When we are scrolling a vertical box horizontally , children should be
allocated horizontally as wide as the full horizontal scrolled area,
not just to the size of the "viewport". Similarly for a horizontal box.
http://bugzilla.moblin.org/show_bug.cgi?id=6312
When a NbtkBoxLayout is allocated a size less than its natural size,
think "shrink" needs to be divided among the children that have
a smaller minimum size than natural size.
This is done by preferentially shrinking the children that are most
expanded from their minimum size and then increasing that set of
children until we've found enough total shrink.
A new method is used of allocating children at integral sizes - instead
of rounding the per-child extra amount to an integer (which causes
cumulative round-off errors), compute the position as we go along in
floats and round individually for each child widget.
Extend the box-layout test to include of a test of a box being set
to various widths, starting quite narrow.
http://bugzilla.moblin.org/show_bug.cgi?id=6311
If the actor isn't in a stage, then setting up the adjustment
based on the actor's size (which we can't compute) and the
size of the default stage (which isn't relevant), doesn't make
sense. Just use arbitrary default values.
The adjustments will be updated to reasonable values when first
the box is first allocated.
It's not entirely clear to me why we ever want to compute the
adjustment settings this way; perhaps we should always use
default values.
http://bugzilla.moblin.org/show_bug.cgi?id=6307
The CSS specification says that the background extends to the
edge of the border (settable in CSS3 with border-clip), make
BigRectangle match this by computing an "effective border color"
as 'border OVER background'.
(If we don't want this behavior - e.g., to be able to use the
transparent borders as margins, then alternatively transparent
border handling would have to be fixed in nbtk-widget.c, since
prior to this transparent and translucent borders were handled
differently.)
The current CSS3 border-image is close to a superset of what we were
doing for -hippo-background-image. Woot! rename ShellThemeImage to
ShellBorderImage and change parsing to look for:
border-image: <url> <number>...
Rather than
-shell-background-image: <url> <length>...
percentanges for the border sizes are not currently supported, neither
are the keywords for handling of the middle part. We always do 'stretch'
for now.
Use BigRectangle to draw the border and background if there's
a border width or border radius and no border image. (Only
uniform borders are supported for now with some deviations
from the CSS model noted in the comments.)
The background color and image parameters are removed from
NbtkWidget's draw_background() method since they were not used
for NbtkButton (the only current user) and the encapsulation
break that they presented caused some minor problems.
Add a test case for borders, and also use borders to style
the buttons in the 'inline-style' test case.
Rather than repeating the computation of borders in many different
widget subclasses, add helper functions:
shell_theme_node_adjust_for_height()
shell_theme_node_adjust_preferred_width()
shell_theme_node_adjust_for_width()
shell_theme_node_adjust_preferred_height()
shell_theme_node_get_content_box()
That are used in get_preferred_width()/get_preferred_height() and
allocate() methods to consistently apply the necessary adjustments.
This allows removing the NbtkPadding type.
Queueing a relayout when the borders/padding change is moved from
nbtk_widget_real_style_changed() to the invoking code to allow access
to the old ShellThemeNode for comparison. (Should this be added as
a parameter to the signal?)
Borders are included in the geometry adjustments, but borders
are not yet drawn.
Add support for passing an inline-style string when creating a
ShellThemeNode.
Hook this up to a new 'style' property of NbtkWidget.
Add a test case that demonstrates using this to update font sizes
on the fly.
ShellTheme replaces both NbtkStyle and ccss_stylesheet_t.
The interface NbtkStylable is replaced by usage of ShellThemeNode.
A concrete node class allows some significant optimizations of property
inheritance that would have been much more difficult to achieve with
the highly abstract pair of NbtkStylable and ccss_node_t.
Some operations that were previously on NbtkStylable (like the
::style-changed signal) are directly on NtkWidget.
Custom properties are no longer registered as param-specs; instead you
call directly into shell theme node to look up a length or color:
shell_theme_node_get_length (theme_node, "border-spacing", FALSE, &spacing);
The dependency on libccss is dropped, while preserving all existing
functionality and adding proper parsing and inheritance of font properties
and proper inheritance for the 'color' property.
Some more javascript tests for CSS functionality are added; workarounds for
a CSS bug where *.some-class was needed instead of .some-class are removed.
Import:
HippoCanvasTheme => ShellTheme
HippoCanvasThemeImage => ShellThemeImage
HippoCanvasStyle => ShellThemeNode
ShellThemeContext is a new class managing the theme for a stage and
global properties like resolution.
test-theme.c is a newly written test program to do verification of the
style matching and property handling rules.
Various changes are made in the import:
- Comprehensive reindentation
- guint32 pixels replaced with ClutterColor
- General pseudo-class support added
- Old-fashioned (non-bordered) background image support added, though
with no support for repeat, etc.
- Bug fixes for problems revealed by test program
Install and distribute gnome-shell.css and theme images. They are moved
down from $datadir to $datadir/theme to avoid a weirdness where we have
images in $datadir and then also in $datadir/images.
(Also moved in the source tree to avoid adding another difference between
installed and uninstalled operation.)
Instead of just checking that we distribute all Javascript files, check
that we distribute everything that is in Git.
The toplevel Makefile.am has a variable DIST_EXCLUDE that lists patterns
of files that we actually don't want to distribute.
Remove several stale C files that we are no longer using.
js/ui/environment.js: Split out initial UI setup (Tweener initialization,
Nbtk monkey-patching) into a separate file we can import from tests.
tests/: Directory for various types of tests
tests/run-test.sh: Shell script that to run tests with an appropriate
environment set up.
tests/testcommon/: Common modules and data for tests
tests/interactive/: Interactive tests
tests/interactive/box-layout.js: A sample test of NbtkLayout
Setting options for children added to NbtkBoxLayout is not convenient
since we are missing the varargs methods of clutter_container.
Patch in:
child_set() - set properties of a child
add() - add a child and set properties (this is different from
clutter_container_add()! I think the deviation is
with avoiding the awkward name add_with_properties()
which is what might be expected. ClutterContainer
currently doesn't have a method like this at all.)
The code is written to allow patching into multiple ClutterContainer
classes but for now only NbtkBoxLayout is patched, since it's the only
container we are using where we need to set options as properties.
https://bugzilla.gnome.org/show_bug.cgi?id=595419
Add GObject Introspection annotations to methods where needed, in
particular adding (transfer none) to return values that don't transfer
ownership.
clutter_texture_cache_get_actor() and clutter_texture_cache_get_texture()
are annotated as (transfer none) since they return a newly
created *floating* texture.
https://bugzilla.gnome.org/show_bug.cgi?id=591245
There are few uses for being able to exit the shell directly; my
current one is that the gtype debug infrastructure is implemented
as an atexit() handler.
This isn't a long-term solution; what we really want is for Alt-F2 to
just be an application search with a hack to detect shell commands,
but in the short term this allows us to run the magic 'lg' command
from the overview.
https://bugzilla.gnome.org/show_bug.cgi?id=595116
Rename beginModal/endModal to pushModal/popModal. All of the current callers
just want to ensure that we're in a modal state; they don't actually need to
fail if we already are.
These functions also now take the Clutter keyboard focus, while recording
the previous focus.
https://bugzilla.gnome.org/show_bug.cgi?id=595116
When we had a filtered set of windows, and want to exit the overview
into a particular window, what we do is re-show all the old windows
first, but don't reset the scaling on them. This will involve
some overlapping, but that's not a big deal because we'll immediately
get overlap anyways in the normal case zooming the windows back.
https://bugzilla.gnome.org/show_bug.cgi?id=594699
When the user click+hold+release over the icon, the effect we want
is for the menu to stick around.
Also, allow the user to mouse over the actual windows and select
them directly. If the user mouses over a window, reflect that in
the menu.
https://bugzilla.gnome.org/show_bug.cgi?id=594699
Callers will generally expect _popup and _popdown to be a no-op if
the menu is already in that state; make it so.
Also change the 'popdown' signal to be 'cancelled'; this is
clearer and allows us to avoid having activate also call popdown.
https://bugzilla.gnome.org/show_bug.cgi?id=594699
There are ton of different kinds of mouse even handlers in the overview;
WindowClone has several mouse-enter/leave handlers, we still have a variety
of classes not ported to ButtonBox and so incorrectly handling double-click,
etc.
Since we at present don't have anything in the overview area for which
it makes sense to interact with during the animation, create a transparent
event-eating box which we raise to the top during the animation.
https://bugzilla.gnome.org/show_bug.cgi?id=594074
controls if there is only one page of results
This makes the search results display more streamlined.
Make sure that we move the selection to a different section if we are going
from displaying a single section to displaying all and the section that
used to be displayed alone doesn't have any results.