1 module glui.default_theme; 2 3 import glui.style; 4 5 immutable Theme gluiDefaultTheme; 6 7 shared static this() { 8 9 gluiDefaultTheme = cast(immutable) Theme.init.makeTheme!q{ 10 11 fontSize = 20; 12 lineHeight = 1.4; 13 charSpacing = 0.1; 14 wordSpacing = 0.5; 15 16 textColor = Colors.BLACK; 17 18 GluiFrame.styleAdd!q{ 19 20 backgroundColor = Colors.WHITE; 21 22 }; 23 24 GluiButton!().styleAdd!q{ 25 26 backgroundColor = Color(0xee, 0xee, 0xee, 0xff); 27 mouseCursor = MouseCursor.MOUSE_CURSOR_POINTING_HAND; 28 29 margin.sideY = 2; 30 padding.sideX = 6; 31 32 focusStyleAdd.backgroundColor = Color(0xdd, 0xdd, 0xdd, 0xff); 33 hoverStyleAdd.backgroundColor = Color(0xcc, 0xcc, 0xcc, 0xff); 34 pressStyleAdd.backgroundColor = Color(0xaa, 0xaa, 0xaa, 0xff); 35 36 }; 37 38 GluiTextInput.styleAdd!q{ 39 40 backgroundColor = Color(0xff, 0xff, 0xff, 0xcc); 41 mouseCursor = MouseCursor.MOUSE_CURSOR_IBEAM; 42 43 margin.sideY = 2; 44 padding.sideX = 6; 45 46 GluiTextInput.emptyStyleAdd.textColor = Color(0x00, 0x00, 0x00, 0xaa); 47 GluiTextInput.focusStyleAdd.backgroundColor = Color(0xff, 0xff, 0xff, 0xff); 48 49 }; 50 51 GluiScrollBar.styleAdd!q{ 52 53 backgroundColor = Color(0xaa, 0xaa, 0xaa, 0xff); 54 55 backgroundStyleAdd.backgroundColor = Color(0xee, 0xee, 0xee, 0xff); 56 hoverStyleAdd.backgroundColor = Color(0x88, 0x88, 0x88, 0xff); 57 focusStyleAdd.backgroundColor = Color(0x77, 0x77, 0x77, 0xff); 58 pressStyleAdd.backgroundColor = Color(0x55, 0x55, 0x55, 0xff); 59 60 }; 61 62 GluiFilePicker.selectedStyleAdd.backgroundColor = Color(0xff, 0x51, 0x2f, 0xff); 63 64 }; 65 66 67 }