~unity-team/unity/trusty-1066971

« back to all changes in this revision

Viewing changes to dash/previews/PreviewContainer.h

  • Committer: Chris Townsend
  • Author(s): Marco Trevisan (Treviño), Eleni Maria Stea
  • Date: 2014-07-24 13:49:53 UTC
  • mto: This revision was merged to the branch mainline in revision 3802.
  • Revision ID: christopher.townsend@canonical.com-20140724134953-x8gokrnrm3ypo5kx
Previews: scale the dash preview contents to match current monitor scaling
  
Improved also the scaling of search-bar, spinner, categories and many other components.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#include <Nux/Nux.h>
27
27
#include <Nux/View.h>
 
28
#include <Nux/VLayout.h>
28
29
#include <UnityCore/Preview.h>
29
30
#include "Preview.h"
30
31
#include "unity-shared/Introspectable.h"
74
75
  sigc::signal<void> navigate_right;
75
76
  sigc::signal<void> request_close;
76
77
 
 
78
  nux::Property<double> scale;
 
79
 
77
80
  bool AcceptKeyNavFocus();
78
81
 
79
82
  nux::Area* KeyNavIteration(nux::KeyNavDirection direction);
91
94
 
92
95
  bool InspectKeyEvent(unsigned int eventType, unsigned int keysym, const char* character);
93
96
  void OnKeyDown(unsigned long event_type, unsigned long event_keysym, unsigned long event_state, const TCHAR* character, unsigned short key_repeat_count);
94
 
  
 
97
 
95
98
private:
96
99
  void SetupViews();
97
100
 
101
104
  bool QueueAnimation();
102
105
 
103
106
private:
 
107
  void UpdateScale(double scale);
 
108
 
104
109
  // View related
105
110
  nux::HLayout* layout_content_;
106
111
  PreviewNavigator* nav_left_;
112
117
  struct timespec  last_progress_time_;
113
118
  float navigation_progress_speed_;
114
119
  int navigation_count_;
115
 
  
 
120
 
116
121
  glib::Source::UniquePtr animation_timer_;
117
122
  friend class PreviewContent;
118
123
};