57
57
IconTexture *screenshot = new IconTexture (preview_->screenshot_icon_hint.c_str(), 420);
58
58
IconTexture *icon = new IconTexture (preview_->icon_hint.c_str(), 80);
59
nux::StaticCairoText *name = new nux::StaticCairoText (preview_->name.c_str(), NUX_TRACKER_LOCATION);
59
nux::StaticCairoText *name = new nux::StaticCairoText (preview_->name, NUX_TRACKER_LOCATION);
60
60
name->SetFont("Ubuntu 25");
62
nux::StaticCairoText *version = new nux::StaticCairoText (preview_->version.c_str(), NUX_TRACKER_LOCATION);
62
nux::StaticCairoText *version = new nux::StaticCairoText (preview_->version, NUX_TRACKER_LOCATION);
63
63
version->SetFont("Ubuntu 15");
65
nux::StaticCairoText *size = new nux::StaticCairoText (preview_->size.c_str(), NUX_TRACKER_LOCATION);
65
nux::StaticCairoText *size = new nux::StaticCairoText (preview_->size, NUX_TRACKER_LOCATION);
66
66
size->SetFont("Ubuntu 15");
68
nux::StaticCairoText *licence = new nux::StaticCairoText (preview_->license.c_str(), NUX_TRACKER_LOCATION);
69
nux::StaticCairoText *last_updated = new nux::StaticCairoText (preview_->last_updated.c_str(), NUX_TRACKER_LOCATION);
68
nux::StaticCairoText *licence = new nux::StaticCairoText (preview_->license, NUX_TRACKER_LOCATION);
69
nux::StaticCairoText *last_updated = new nux::StaticCairoText (preview_->last_updated, NUX_TRACKER_LOCATION);
70
70
description = new nux::StaticCairoText ("", NUX_TRACKER_LOCATION);
72
72
//description->SetBaseWidth(350);
73
73
description->SetMaximumWidth(350);
74
74
description->SetLines(99999999);
75
description->SetText(preview_->description.c_str());
75
description->SetText(preview_->description);
77
77
std::ostringstream number_of_reviews;
78
78
number_of_reviews << preview_->n_ratings << " Reviews";
79
nux::StaticCairoText *review_total = new nux::StaticCairoText (number_of_reviews.str().c_str(), NUX_TRACKER_LOCATION);
79
nux::StaticCairoText *review_total = new nux::StaticCairoText (number_of_reviews.str(), NUX_TRACKER_LOCATION);
81
81
nux::HLayout *large_container = new nux::HLayout(NUX_TRACKER_LOCATION);
82
82
nux::VLayout *screenshot_container = new nux::VLayout(NUX_TRACKER_LOCATION);
87
87
nux::HLayout *button_container = new nux::HLayout(NUX_TRACKER_LOCATION);
89
89
// create the action buttons
90
PreviewBasicButton* primary_button = new PreviewBasicButton(preview_->primary_action_name.c_str(), NUX_TRACKER_LOCATION);
90
PreviewBasicButton* primary_button = new PreviewBasicButton(preview_->primary_action_name, NUX_TRACKER_LOCATION);
91
91
//FIXME - add secondary action when we have the backend for it
92
92
primary_button->state_change.connect ([&] (nux::View *view) { UriActivated.emit (preview_->primary_action_uri); });
93
93
button_container->AddLayout (new nux::SpaceLayout(6,6,6,6), 0);
153
153
g_debug ("layout recomputing");
154
154
description->SetBaseWidth((GetGeometry().width / 2) - 16 - 12 );
155
155
description->SetMaximumWidth((GetGeometry().width / 2) - 16 - 12 );
156
description->SetText(preview_->description.c_str());
156
description->SetText(preview_->description);
159
159
void PreviewApplications::Draw (nux::GraphicsEngine &GfxContext, bool force_draw) {