Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
style.hpp File Reference
#include <initializer_list>
#include <string>
#include <unordered_map>
#include <utility>

Go to the source code of this file.

Classes

struct  aurore::StyleMetric
 A metric of the base, with its kind. More...
 
class  aurore::StyleValues
 
class  aurore::Style
 Simple wrapper around StyleValues for the array operator. More...
 

Namespaces

namespace  aurore
 

Enumerations

enum class  aurore::MetricKind { aurore::OTHER , aurore::LENGTH }
 

Functions

void aurore::setDensity (float density)
 
float aurore::getDensity ()
 The density in use (DENSITY_COMFORTABLE by default).
 
float aurore::dp (float length)
 length at the density in use: what 16dp is in XML.
 
bool aurore::parseDensity (const std::string &text, float *density)
 
Style aurore::getStyle ()
 The app's metrics: what XML reads with @style/….
 

Variables

constexpr float aurore::DENSITY_COMFORTABLE = 1.0f
 The density: lengths drawn that many times their size (aurore::dp()).
 
constexpr float aurore::DENSITY_COMPACT = 0.85f
 
constexpr float aurore::DENSITY_DENSE = 0.7f
 small screens
 
constexpr float aurore::DENSITY_MIN = 0.5f
 
constexpr float aurore::DENSITY_MAX = 1.5f