summaryrefslogtreecommitdiff
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2012-02-07 21:46:22 +0100
committerAndrea Azzarone <azzaronea@gmail.com>2012-02-07 21:46:22 +0100
commitb7f01233cd22bc9f1bc5cf415c129e86ee884698 (patch)
tree950be378088895d594e32c885fd44fbffb22937e
parentff41cd509555ca322750b73c8fa21ade2057f635 (diff)
parent980055d64de39ee97cbc6afe4f28ee4aaa4dbafd (diff)
Merge trunk.
(bzr r1858.7.17)
-rw-r--r--com.canonical.Unity.gschema.xml5
-rw-r--r--plugins/unityshell/src/BGHash.cpp15
-rw-r--r--plugins/unityshell/src/DashStyle.cpp47
-rw-r--r--plugins/unityshell/src/DashStyle.h4
-rw-r--r--plugins/unityshell/src/FilterMultiRangeButton.cpp132
-rw-r--r--plugins/unityshell/src/FilterMultiRangeButton.h31
-rw-r--r--plugins/unityshell/src/Launcher.cpp18
-rw-r--r--plugins/unityshell/src/LauncherOptions.cpp2
-rw-r--r--plugins/unityshell/src/LauncherOptions.h7
-rw-r--r--plugins/unityshell/src/QuicklistMenuItem.cpp4
-rw-r--r--plugins/unityshell/src/QuicklistMenuItemSeparator.cpp12
-rw-r--r--plugins/unityshell/src/unityshell.cpp4
-rw-r--r--plugins/unityshell/unityshell.xml.in17
-rw-r--r--tests/autopilot/autopilot/emulators/unity.py2
14 files changed, 248 insertions, 52 deletions
diff --git a/com.canonical.Unity.gschema.xml b/com.canonical.Unity.gschema.xml
index bb783b7d6..7d9603ac2 100644
--- a/com.canonical.Unity.gschema.xml
+++ b/com.canonical.Unity.gschema.xml
@@ -20,6 +20,11 @@
<summary>Whether the home screen should be expanded.</summary>
<description>Whether the home screen should be expanded.</description>
</key>
+ <key type="s" name="average-bg-color">
+ <default>'#757550507B7BFFFF'</default>
+ <summary>Average background color</summary>
+ <description>The average color derived from the currently set desktop-wallpaper. This is written/updated by the Unity-process and read by NotifyOSD-process for example.</description>
+ </key>
</schema>
<schema path="/desktop/unity/launcher/" id="com.canonical.Unity.Launcher" gettext-domain="unity">
<key type="as" name="favorites">
diff --git a/plugins/unityshell/src/BGHash.cpp b/plugins/unityshell/src/BGHash.cpp
index 26d901268..c791687a4 100644
--- a/plugins/unityshell/src/BGHash.cpp
+++ b/plugins/unityshell/src/BGHash.cpp
@@ -35,6 +35,8 @@ namespace {
int level_of_recursion;
const int MAX_LEVEL_OF_RECURSION = 16;
const int MIN_LEVEL_OF_RECURSION = 2;
+ std::string AVG_BG_COLOR = "average-bg-color";
+ std::string UNITY_SCHEMA = "com.canonical.Unity";
}
namespace unity {
@@ -373,6 +375,19 @@ namespace unity {
_current_color.blue * 0.7f,
0.5)
);
+ GSettings* settings = NULL;
+ GdkColor color = {0,
+ (guint16) (_current_color.red * 65535.0 * 0.7f),
+ (guint16) (_current_color.green * 65535.0 * 0.7f),
+ (guint16) (_current_color.blue * 65535.0 * 0.7f)};
+
+ settings = g_settings_new (UNITY_SCHEMA.c_str());
+ if (settings)
+ {
+ unity::glib::String color_string(gdk_color_to_string(&color));
+ g_settings_set_string(settings, AVG_BG_COLOR.c_str(), color_string);
+ g_object_unref (settings);
+ }
}
GdkPixbuf *BGHash::GetPixbufFromBG ()
diff --git a/plugins/unityshell/src/DashStyle.cpp b/plugins/unityshell/src/DashStyle.cpp
index f8bed191b..6e1d8945c 100644
--- a/plugins/unityshell/src/DashStyle.cpp
+++ b/plugins/unityshell/src/DashStyle.cpp
@@ -1940,6 +1940,53 @@ bool Style::MultiRangeSegment(cairo_t* cr,
return true;
}
+bool Style::MultiRangeFocusOverlay(cairo_t* cr,
+ Arrow arrow,
+ Segment segment)
+{
+ // sanity checks
+ if (cairo_status(cr) != CAIRO_STATUS_SUCCESS)
+ return false;
+
+ if (cairo_surface_get_type(cairo_get_target(cr)) != CAIRO_SURFACE_TYPE_IMAGE)
+ return false;
+
+ double x = 0.0;
+ double y = 2.0;
+ double w = cairo_image_surface_get_width(cairo_get_target(cr));
+ double h = cairo_image_surface_get_height(cairo_get_target(cr)) - 4.0;
+
+ if (segment == Segment::LEFT)
+ {
+ x = 2.0;
+ w -= 2.0;
+ }
+
+ if (segment == Segment::RIGHT)
+ {
+ w -= 2.0;
+ }
+
+ cairo_set_line_width(cr, pimpl->button_label_border_size_[nux::ButtonVisualState::VISUAL_STATE_NORMAL]);
+
+ pimpl->RoundedRectSegment(cr,
+ 1.0,
+ x,
+ y,
+ h / 4.0,
+ w,
+ h,
+ segment,
+ arrow,
+ nux::ButtonVisualState::VISUAL_STATE_PRESSED);
+
+ cairo_set_source_rgba(cr, nux::Color(1.0f, 1.0f, 1.0f, 0.5f));
+ cairo_fill_preserve(cr);
+ cairo_stroke(cr);
+
+ return true;
+}
+
bool Style::TrackViewNumber(cairo_t* cr,
nux::ButtonVisualState state,
std::string const& trackNumber)
diff --git a/plugins/unityshell/src/DashStyle.h b/plugins/unityshell/src/DashStyle.h
index a003da142..98f604f2f 100644
--- a/plugins/unityshell/src/DashStyle.h
+++ b/plugins/unityshell/src/DashStyle.h
@@ -118,6 +118,10 @@ public:
Arrow arrow,
Segment segment);
+ virtual bool MultiRangeFocusOverlay(cairo_t* cr,
+ Arrow arrow,
+ Segment segment);
+
virtual bool TrackViewNumber(cairo_t* cr,
nux::ButtonVisualState state,
std::string const& trackNumber);
diff --git a/plugins/unityshell/src/FilterMultiRangeButton.cpp b/plugins/unityshell/src/FilterMultiRangeButton.cpp
index ea613ea18..63e7ec6aa 100644
--- a/plugins/unityshell/src/FilterMultiRangeButton.cpp
+++ b/plugins/unityshell/src/FilterMultiRangeButton.cpp
@@ -35,8 +35,7 @@ FilterMultiRangeButton::FilterMultiRangeButton(std::string const& label, NUX_FIL
, has_arrow_(MultiRangeArrow::NONE)
, side_(MultiRangeSide::CENTER)
{
- InitTheme();
- state_change.connect(sigc::mem_fun(this, &FilterMultiRangeButton::OnActivated));
+ Init();
}
FilterMultiRangeButton::FilterMultiRangeButton(NUX_FILE_LINE_DECL)
@@ -44,16 +43,22 @@ FilterMultiRangeButton::FilterMultiRangeButton(NUX_FILE_LINE_DECL)
, has_arrow_(MultiRangeArrow::NONE)
, side_(MultiRangeSide::CENTER)
{
- InitTheme();
- SetAcceptKeyNavFocusOnMouseDown(false);
-
- state_change.connect(sigc::mem_fun(this, &FilterMultiRangeButton::OnActivated));
+ Init();
}
FilterMultiRangeButton::~FilterMultiRangeButton()
{
}
+void FilterMultiRangeButton::Init()
+{
+ InitTheme();
+ SetAcceptKeyNavFocusOnMouseDown(false);
+
+ state_change.connect(sigc::mem_fun(this, &FilterMultiRangeButton::OnActivated));
+ key_nav_focus_change.connect([&](nux::Area*, bool, nux::KeyNavDirection) { QueueDraw(); });
+}
+
void FilterMultiRangeButton::OnActivated(nux::Area* area)
{
if (filter_)
@@ -78,35 +83,43 @@ FilterOption::Ptr FilterMultiRangeButton::GetFilter()
void FilterMultiRangeButton::SetVisualSide(MultiRangeSide side)
{
- nux::Geometry const& geo = GetGeometry();
-
+ if (side_ == side)
+ return;
side_ = side;
- prelight_->Invalidate(geo);
- active_->Invalidate(geo);
- normal_->Invalidate(geo);
+
+ QueueDraw();
}
void FilterMultiRangeButton::SetHasArrow(MultiRangeArrow value)
{
+ if (has_arrow_ == value)
+ return;
has_arrow_ = value;
- active_->Invalidate(GetGeometry());
- NeedRedraw();
+
+ QueueDraw();
}
long FilterMultiRangeButton::ComputeContentSize()
{
- if (!active_)
- {
- InitTheme();
- }
long ret = nux::ToggleButton::ComputeContentSize();
nux::Geometry const& geo = GetGeometry();
if (cached_geometry_ != geo)
{
- prelight_->Invalidate(geo);
- active_->Invalidate(geo);
- normal_->Invalidate(geo);
cached_geometry_ = geo;
+
+ std::vector<MultiRangeSide> sides = {MultiRangeSide::LEFT, MultiRangeSide::RIGHT, MultiRangeSide::CENTER};
+ std::vector<MultiRangeArrow> arrows = {MultiRangeArrow::LEFT, MultiRangeArrow::RIGHT, MultiRangeArrow::BOTH, MultiRangeArrow::NONE};
+
+ for (auto arrow : arrows)
+ {
+ for (auto side : sides)
+ {
+ prelight_[MapKey(arrow, side)]->Invalidate(geo);
+ active_[MapKey(arrow, side)]->Invalidate(geo);
+ normal_[MapKey(arrow, side)]->Invalidate(geo);
+ focus_[MapKey(arrow, side)]->Invalidate(geo);
+ }
+ }
}
return ret;
@@ -114,18 +127,33 @@ long FilterMultiRangeButton::ComputeContentSize()
void FilterMultiRangeButton::InitTheme()
{
- if (!active_)
+ if (!active_[MapKey(MultiRangeArrow::LEFT, MultiRangeSide::LEFT)])
{
nux::Geometry const& geo = GetGeometry();
- active_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRESSED)));
- normal_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL)));
- prelight_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT)));
+
+ std::vector<MultiRangeSide> sides = {MultiRangeSide::LEFT, MultiRangeSide::RIGHT, MultiRangeSide::CENTER};
+ std::vector<MultiRangeArrow> arrows = {MultiRangeArrow::LEFT, MultiRangeArrow::RIGHT, MultiRangeArrow::BOTH, MultiRangeArrow::NONE};
+
+ for (auto arrow : arrows)
+ {
+ for (auto side : sides)
+ {
+ active_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRESSED, arrow, side)));
+ normal_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL, arrow, side)));
+ prelight_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT, arrow, side)));
+ focus_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawFocusOverlay), arrow, side)));
+ }
+ }
}
SetMinimumHeight(32);
}
-void FilterMultiRangeButton::RedrawTheme(nux::Geometry const& geom, cairo_t* cr, nux::ButtonVisualState faked_state)
+void FilterMultiRangeButton::RedrawTheme(nux::Geometry const& geom,
+ cairo_t* cr,
+ nux::ButtonVisualState faked_state,
+ MultiRangeArrow faked_arrow,
+ MultiRangeSide faked_side)
{
std::string name("10");
std::stringstream final;
@@ -137,19 +165,19 @@ void FilterMultiRangeButton::RedrawTheme(nux::Geometry const& geom, cairo_t* cr,
}
Arrow arrow;
- if (has_arrow_ == MultiRangeArrow::NONE)
+ if (faked_arrow == MultiRangeArrow::NONE)
arrow = Arrow::NONE;
- else if (has_arrow_ == MultiRangeArrow::LEFT)
+ else if (faked_arrow == MultiRangeArrow::LEFT)
arrow = Arrow::LEFT;
- else if (has_arrow_ == MultiRangeArrow::BOTH)
+ else if (faked_arrow == MultiRangeArrow::BOTH)
arrow = Arrow::BOTH;
else
arrow = Arrow::RIGHT;
Segment segment;
- if (side_ == MultiRangeSide::LEFT)
+ if (faked_side == MultiRangeSide::LEFT)
segment = Segment::LEFT;
- else if (side_ == MultiRangeSide::CENTER)
+ else if (faked_side == MultiRangeSide::CENTER)
segment = Segment::MIDDLE;
else
segment = Segment::RIGHT;
@@ -158,6 +186,33 @@ void FilterMultiRangeButton::RedrawTheme(nux::Geometry const& geom, cairo_t* cr,
NeedRedraw();
}
+void FilterMultiRangeButton::RedrawFocusOverlay(nux::Geometry const& geom,
+ cairo_t* cr,
+ MultiRangeArrow faked_arrow,
+ MultiRangeSide faked_side)
+{
+ Arrow arrow;
+ if (faked_arrow == MultiRangeArrow::NONE)
+ arrow = Arrow::NONE;
+ else if (faked_arrow == MultiRangeArrow::LEFT)
+ arrow = Arrow::LEFT;
+ else if (faked_arrow == MultiRangeArrow::BOTH)
+ arrow = Arrow::BOTH;
+ else
+ arrow = Arrow::RIGHT;
+
+ Segment segment;
+ if (faked_side == MultiRangeSide::LEFT)
+ segment = Segment::LEFT;
+ else if (faked_side == MultiRangeSide::CENTER)
+ segment = Segment::MIDDLE;
+ else
+ segment = Segment::RIGHT;
+
+ Style::Instance().MultiRangeFocusOverlay(cr, arrow, segment);
+ QueueDraw();
+}
+
void FilterMultiRangeButton::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
{
nux::Geometry const& geo = GetGeometry();
@@ -181,16 +236,27 @@ void FilterMultiRangeButton::Draw(nux::GraphicsEngine& GfxContext, bool force_dr
geo.height,
col);
- nux::BaseTexture* texture = normal_->GetTexture();
+ nux::BaseTexture* texture = normal_[MapKey(has_arrow_, side_)]->GetTexture();
//FIXME - dashstyle does not give us a focused state yet, so ignore
if (GetVisualState() == nux::ButtonVisualState::VISUAL_STATE_PRELIGHT)
{
- texture = prelight_->GetTexture();
+ texture = prelight_[MapKey(has_arrow_, side_)]->GetTexture();
}
if (Active())
{
- texture = active_->GetTexture();
+ texture = active_[MapKey(has_arrow_, side_)]->GetTexture();
+ }
+
+ if (HasKeyFocus())
+ {
+ GfxContext.QRP_1Tex(geo.x,
+ geo.y,
+ geo.width,
+ geo.height,
+ focus_[MapKey(has_arrow_, side_)]->GetTexture()->GetDeviceTexture(),
+ texxform,
+ nux::color::White);
}
GfxContext.QRP_1Tex(geo.x,
diff --git a/plugins/unityshell/src/FilterMultiRangeButton.h b/plugins/unityshell/src/FilterMultiRangeButton.h
index 501f19cad..90dc65f58 100644
--- a/plugins/unityshell/src/FilterMultiRangeButton.h
+++ b/plugins/unityshell/src/FilterMultiRangeButton.h
@@ -36,16 +36,16 @@ namespace unity
namespace dash
{
-enum class MultiRangeSide
+enum class MultiRangeSide : unsigned int
{
- LEFT,
+ LEFT = 0,
RIGHT,
CENTER
};
-enum class MultiRangeArrow
+enum class MultiRangeArrow : unsigned int
{
- LEFT,
+ LEFT = 0,
RIGHT,
BOTH,
NONE
@@ -70,17 +70,32 @@ protected:
private:
void InitTheme();
- void RedrawTheme(nux::Geometry const& geom, cairo_t* cr, nux::ButtonVisualState faked_state);
+ void Init();
+
+ void RedrawTheme(nux::Geometry const& geom,
+ cairo_t* cr,
+ nux::ButtonVisualState faked_state,
+ MultiRangeArrow faked_arrow,
+ MultiRangeSide faked_side);
+
+ void RedrawFocusOverlay(nux::Geometry const& geom,
+ cairo_t* cr,
+ MultiRangeArrow faked_arrow,
+ MultiRangeSide faked_side);
+
void OnActivated(nux::Area* area);
void OnActiveChanged(bool value);
FilterOption::Ptr filter_;
typedef std::unique_ptr<nux::CairoWrapper> NuxCairoPtr;
+ typedef std::pair<MultiRangeArrow, MultiRangeSide> MapKey;
+
+ std::map<MapKey, NuxCairoPtr> active_;
+ std::map<MapKey, NuxCairoPtr> focus_;
+ std::map<MapKey, NuxCairoPtr> normal_;
+ std::map<MapKey, NuxCairoPtr> prelight_;
- NuxCairoPtr active_;
- NuxCairoPtr normal_;
- NuxCairoPtr prelight_;
nux::Geometry cached_geometry_;
MultiRangeArrow has_arrow_;
MultiRangeSide side_;
diff --git a/plugins/unityshell/src/Launcher.cpp b/plugins/unityshell/src/Launcher.cpp
index 70b79f1ae..a3e5b9571 100644
--- a/plugins/unityshell/src/Launcher.cpp
+++ b/plugins/unityshell/src/Launcher.cpp
@@ -1766,7 +1766,7 @@ void Launcher::Resize()
_pointer_barrier->x1 = new_geometry.x;
_pointer_barrier->x2 = new_geometry.x;
- _pointer_barrier->y1 = new_geometry.y;
+ _pointer_barrier->y1 = new_geometry.y - panel_height;
_pointer_barrier->y2 = new_geometry.y + new_geometry.height;
_pointer_barrier->threshold = options()->edge_stop_velocity();
@@ -2338,8 +2338,24 @@ void Launcher::RecvMouseWheel(int x, int y, int wheel_delta, unsigned long butto
void Launcher::OnPointerBarrierEvent(ui::PointerBarrierWrapper* owner, ui::BarrierEvent::Ptr event)
{
nux::Geometry abs_geo = GetAbsoluteGeometry();
+
+ bool apply_to_reveal = false;
if (_hidden && event->x >= abs_geo.x && event->x <= abs_geo.x + abs_geo.width)
{
+ if (options()->reveal_trigger == RevealTrigger::EDGE)
+ {
+ if (event->y >= abs_geo.y)
+ apply_to_reveal = true;
+ }
+ else if (options()->reveal_trigger == RevealTrigger::CORNER)
+ {
+ if (event->y < abs_geo.y)
+ apply_to_reveal = true;
+ }
+ }
+
+ if (apply_to_reveal)
+ {
_hide_machine->AddRevealPressure(event->velocity);
decaymulator_->value = 0;
}
diff --git a/plugins/unityshell/src/LauncherOptions.cpp b/plugins/unityshell/src/LauncherOptions.cpp
index c77045371..bb3534e55 100644
--- a/plugins/unityshell/src/LauncherOptions.cpp
+++ b/plugins/unityshell/src/LauncherOptions.cpp
@@ -39,6 +39,7 @@ Options::Options()
hide_mode = LAUNCHER_HIDE_DODGE_WINDOWS;
icon_size = 48;
launch_animation = LAUNCH_ANIMATION_PULSE;
+ reveal_trigger = RevealTrigger::EDGE;
tile_size = 54;
urgent_animation = URGENT_ANIMATION_WIGGLE;
@@ -53,6 +54,7 @@ Options::Options()
hide_mode.changed.connect ([&] (LauncherHideMode value) -> void { option_changed.emit(); });
icon_size.changed.connect ([&] (int value) -> void { option_changed.emit(); });
launch_animation.changed.connect ([&] (LaunchAnimation value) -> void { option_changed.emit(); });
+ reveal_trigger.changed.connect ([&] (RevealTrigger vallue) -> void { option_changed.emit(); });
tile_size.changed.connect ([&] (int value) -> void { option_changed.emit(); });
urgent_animation.changed.connect ([&] (UrgentAnimation value) -> void { option_changed.emit(); });
}
diff --git a/plugins/unityshell/src/LauncherOptions.h b/plugins/unityshell/src/LauncherOptions.h
index 6acea99ff..0079ba11c 100644
--- a/plugins/unityshell/src/LauncherOptions.h
+++ b/plugins/unityshell/src/LauncherOptions.h
@@ -72,6 +72,12 @@ typedef enum
BACKLIGHT_NORMAL_EDGE_TOGGLE
} BacklightMode;
+enum RevealTrigger
+{
+ EDGE,
+ CORNER,
+};
+
class Options : public sigc::trackable
{
public:
@@ -84,6 +90,7 @@ public:
nux::Property<UrgentAnimation> urgent_animation;
nux::Property<AutoHideAnimation> auto_hide_animation;
nux::Property<BacklightMode> backlight_mode;
+ nux::Property<RevealTrigger> reveal_trigger;
nux::Property<int> icon_size;
nux::Property<int> tile_size;
nux::Property<float> background_alpha;
diff --git a/plugins/unityshell/src/QuicklistMenuItem.cpp b/plugins/unityshell/src/QuicklistMenuItem.cpp
index 39b74a60a..cdd043f84 100644
--- a/plugins/unityshell/src/QuicklistMenuItem.cpp
+++ b/plugins/unityshell/src/QuicklistMenuItem.cpp
@@ -439,8 +439,8 @@ void QuicklistMenuItem::DrawPrelight(nux::CairoGraphics* cairo, int width, int h
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_rgba(cr, color.red, color.blue, color.green, color.alpha);
- cairo->DrawRoundedRectangle(cr, 1.0f, 0.5f, 0.5f, ITEM_CORNER_RADIUS_ABS,
- width - 1.0f, height - 1.0f);
+ cairo->DrawRoundedRectangle(cr, 1.0f, 0.0f, 0.0f, ITEM_CORNER_RADIUS_ABS,
+ width, height);
cairo_fill(cr);
}
diff --git a/plugins/unityshell/src/QuicklistMenuItemSeparator.cpp b/plugins/unityshell/src/QuicklistMenuItemSeparator.cpp
index 69e56cd7e..c2c0aa55c 100644
--- a/plugins/unityshell/src/QuicklistMenuItemSeparator.cpp
+++ b/plugins/unityshell/src/QuicklistMenuItemSeparator.cpp
@@ -31,8 +31,8 @@ QuicklistMenuItemSeparator::QuicklistMenuItemSeparator(DbusmenuMenuitem* item,
NUX_FILE_LINE_PARAM)
{
_name = "QuicklistMenuItemSeparator";
- SetMinimumHeight(5);
- SetBaseSize(64, 5);
+ SetMinimumHeight(7);
+ SetBaseSize(64, 7);
_color = nux::Color(1.0f, 1.0f, 1.0f, 0.5f);
_premultiplied_color = nux::Color(0.5f, 0.5f, 0.5f, 0.5f);
@@ -47,8 +47,8 @@ QuicklistMenuItemSeparator::QuicklistMenuItemSeparator(DbusmenuMenuitem* item,
NUX_FILE_LINE_PARAM)
{
_name = "QuicklistMenuItemSeparator";
- SetMinimumHeight(5);
- SetBaseSize(64, 5);
+ SetMinimumHeight(7);
+ SetBaseSize(64, 7);
//_normalTexture = NULL;
_color = nux::Color(1.0f, 1.0f, 1.0f, 0.5f);
_premultiplied_color = nux::Color(0.5f, 0.5f, 0.5f, 0.5f);
@@ -156,8 +156,8 @@ QuicklistMenuItemSeparator::UpdateTexture()
cairo_paint(cr);
cairo_set_source_rgba(cr, _color.red, _color.green, _color.blue, _color.alpha);
cairo_set_line_width(cr, 1.0f);
- cairo_move_to(cr, 0.5f, 2.5f);
- cairo_line_to(cr, width - 0.5f, 2.5f);
+ cairo_move_to(cr, 0.0f, 3.5f);
+ cairo_line_to(cr, width, 3.5f);
cairo_stroke(cr);
if (_normalTexture[0])
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index a6fad33b4..6e3746f59 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -263,6 +263,7 @@ UnityScreen::UnityScreen(CompScreen* screen)
optionSetBackgroundColorNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
optionSetLauncherHideModeNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
optionSetBacklightModeNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
+ optionSetRevealTriggerNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
optionSetLaunchAnimationNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
optionSetUrgentAnimationNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
optionSetPanelOpacityNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
@@ -2311,6 +2312,9 @@ void UnityScreen::optionChanged(CompOption* opt, UnityshellOptions::Options num)
case UnityshellOptions::BacklightMode:
launcher_options->backlight_mode = (unity::launcher::BacklightMode) optionGetBacklightMode();
break;
+ case UnityshellOptions::RevealTrigger:
+ launcher_options->reveal_trigger = (unity::launcher::RevealTrigger) optionGetRevealTrigger();
+ break;
case UnityshellOptions::LaunchAnimation:
launcher_options->launch_animation = (unity::launcher::LaunchAnimation) optionGetLaunchAnimation();
break;
diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in
index 4dd37d46b..b003b0dd5 100644
--- a/plugins/unityshell/unityshell.xml.in
+++ b/plugins/unityshell/unityshell.xml.in
@@ -52,7 +52,7 @@
<_long>Make the launcher hide automatically after some time of inactivity: always or just when the focussed window is not over the launcher</_long>
<min>0</min>
<max>3</max>
- <default>2</default>
+ <default>0</default>
<desc>
<value>0</value>
<_name>Never</_name>
@@ -70,6 +70,21 @@
<_name>Dodge Active Window</_name>
</desc>
</option>
+ <option name="reveal_trigger" type="int">
+ <_short>Reveal Trigger</_short>
+ <_long></_long>
+ <min>0</min>
+ <max>1</max>
+ <default>0</default>
+ <desc>
+ <value>0</value>
+ <_name>Left Edge</_name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <_name>Top Left Corner</_name>
+ </desc>
+ </option>
<option name="show_launcher" type="key">
<_short>Key to show the launcher</_short>
<_long>Make the launcher appear with that key</_long>
diff --git a/tests/autopilot/autopilot/emulators/unity.py b/tests/autopilot/autopilot/emulators/unity.py
index 5c1f579c8..52451fcde 100644
--- a/tests/autopilot/autopilot/emulators/unity.py
+++ b/tests/autopilot/autopilot/emulators/unity.py
@@ -348,7 +348,7 @@ class Dash(Unity):
return unicode(self.get_state("//DashController/DashView/LensBar")[0]['focused-lens-icon'])
def get_num_rows(self):
- """Returns the id of the current focused icon."""
+ """Returns the number of displayed rows in the dash."""
return self.get_state("//DashController/DashView")[0]['num-rows']
def reveal_application_lens(self):