diff options
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/DashStyle.cpp | 7 | ||||
| -rw-r--r-- | unity-shared/UBusMessages.h | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp index 31d997f0f..8ac12c7d7 100644 --- a/unity-shared/DashStyle.cpp +++ b/unity-shared/DashStyle.cpp @@ -123,7 +123,7 @@ public: void Text(cairo_t* cr, nux::Color const& color, std::string const& label, - int font_size = -1, + int font_size, double horizMargin = 4.0, Alignment alignment = Alignment::CENTER); @@ -1355,6 +1355,10 @@ void Style::Impl::Text(cairo_t* cr, { pango_font_description_set_absolute_size(desc, text_size * PANGO_SCALE); } + else if (desc) + { + text_size = pango_font_description_get_size(desc) / PANGO_SCALE; + } PangoWeight weight; switch (regular_text_weight_) @@ -1627,7 +1631,6 @@ bool Style::SquareButton(cairo_t* cr, nux::ButtonVisualState state, int font_size, Alignment alignment, bool zeromargin) { - // sanity checks if (cairo_status(cr) != CAIRO_STATUS_SUCCESS) return false; diff --git a/unity-shared/UBusMessages.h b/unity-shared/UBusMessages.h index 603baa19f..777217e0c 100644 --- a/unity-shared/UBusMessages.h +++ b/unity-shared/UBusMessages.h @@ -82,6 +82,15 @@ // FIXME - fix the nux focus api so we don't need this #define UBUS_RESULT_VIEW_KEYNAV_CHANGED "RESULT_VIEW_KEYNAV_CHANGED" +// for communicating positions to the preview state machine (iii) +// (split y coord in absolute geometry, results to the left, results to the right) +#define UBUS_DASH_PREVIEW_INFO_PAYLOAD "DASH_PREVIEW_INFO_PAYLOAD" + +// called when previews wish to navigate left/right or close (is) +// -1 = left, 0 = close, 1 = right, +// string is the uri string that last result activated was +#define UBUS_DASH_PREVIEW_NAVIGATION_REQUEST "DASH_PREVIEW_NAVIGATION_REQUEST" + // Sends a string datatype containing the new icon name #define UBUS_HUD_ICON_CHANGED "HUD_ICON_CHANGED" #define UBUS_HUD_CLOSE_REQUEST "HUD_CLOSE_REQUEST" |
