Merge pull request #515 from denizzzka/const_3

Adds const for orientation() method
This commit is contained in:
Vadim Lopatin 2017-11-14 18:15:51 +03:00 committed by GitHub
commit e708c1129b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 13 deletions

View File

@ -108,17 +108,7 @@ version(USE_CONSOLE) {
enum BACKEND_CONSOLE = false;
} else version (USE_EXTERNAL) {
// External backend already selected using version identifier
version (USE_OPENGL) {
enum ENABLE_OPENGL = true;
} else {
enum ENABLE_OPENGL = false;
}
enum BACKEND_GUI = false;
enum BACKEND_CONSOLE = false;
enum BACKEND_SDL = false;
enum BACKEND_X11 = false;
enum BACKEND_DSFML = false;
enum BACKEND_WIN32 = false;
// All config variables should be settled in external config file
} else {
// no backend selected: set default based on platform
version (Windows) {

View File

@ -362,7 +362,7 @@ class ImageTextButton : HorizontalLayout {
override @property Widget text(UIString s) { _label.text = s; requestLayout(); return this; }
/// Returns orientation: Vertical - image top, Horizontal - image left"
override @property Orientation orientation() {
override @property Orientation orientation() const {
return super.orientation();
}

View File

@ -521,7 +521,7 @@ class ResizerWidget : Widget {
class LinearLayout : WidgetGroupDefaultDrawing {
protected Orientation _orientation = Orientation.Vertical;
/// returns linear layout orientation (Vertical, Horizontal)
@property Orientation orientation() { return _orientation; }
@property Orientation orientation() const { return _orientation; }
/// sets linear layout orientation
@property LinearLayout orientation(Orientation value) { _orientation = value; requestLayout(); return this; }