Merge lp:~macslow/nux/nux.metrics into lp:nux/2.0
Proposed by
Mirco Müller
Status: | Merged |
---|---|
Approved by: | Mirco Müller |
Approved revision: | 511 |
Merged at revision: | 575 |
Proposed branch: | lp:~macslow/nux/nux.metrics |
Merge into: | lp:nux/2.0 |
Diff against target: |
236 lines (+193/-0) 5 files modified
Nux/Makefile.am (+2/-0) Nux/Metrics.cpp (+57/-0) Nux/Metrics.h (+39/-0) tests/Makefile.am (+1/-0) tests/test-nux-metrics.cpp (+94/-0) |
To merge this branch: | bzr merge lp:~macslow/nux/nux.metrics |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Trevisan (Treviño) | Needs Information | ||
Andrea Azzarone (community) | Approve | ||
Review via email: mp+92800@code.launchpad.net |
Description of the change
Class Metrics providing pixel->EM and EM->pixel conversion functions, thus making nux ready for resolution-
To post a comment you must log in.
Copyright (C) 2011 Canonical Ltd
2012...
---
+#include "config.h"
Is this really needed?
---
57 + xres = ((((double) DisplayWidth( dpy,scr) ) * 25.4) / dpy,scr) )); dpy,scr) ) * 25.4) / (dpy,scr) ));
58 + ((double) DisplayWidthMM(
59 + yres = ((((double) DisplayHeight(
60 + ((double) DisplayHeightMM
C style cast... :(
---
+ Metrics::~Metrics ()
73 + {
74 + }
It doesn nothing, so remove it :)
---
110 +#ifndef METRICS_H
111 +#define METRICS_H
Should be NUX_MET..
---
+#include <X11/Xlib.h>
I'd prefer a fwd declaration for Display if it is possible.
---
Ah, no spaces between the function name and the bracket. And you've not pushed the unit-test :)
P.S. I'm not marking it as Need Fixing because these "issues" are not blocking.