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 disabledStyleAdd!q{ 36 37 textColor = Color(0x00, 0x00, 0x00, 0xaa); 38 backgroundColor = Color(0xee, 0xee, 0xee, 0x55); 39 40 }; 41 42 }; 43 44 GluiTextInput.styleAdd!q{ 45 46 backgroundColor = Color(0xff, 0xff, 0xff, 0xcc); 47 mouseCursor = MouseCursor.MOUSE_CURSOR_IBEAM; 48 49 margin.sideY = 2; 50 padding.sideX = 6; 51 52 emptyStyleAdd.textColor = Color(0x00, 0x00, 0x00, 0xaa); 53 focusStyleAdd.backgroundColor = Color(0xff, 0xff, 0xff, 0xff); 54 disabledStyleAdd!q{ 55 56 textColor = Color(0x00, 0x00, 0x00, 0xaa); 57 backgroundColor = Color(0xff, 0xff, 0xff, 0x55); 58 59 }; 60 61 }; 62 63 GluiScrollBar.styleAdd!q{ 64 65 backgroundColor = Color(0xaa, 0xaa, 0xaa, 0xff); 66 67 backgroundStyleAdd.backgroundColor = Color(0xee, 0xee, 0xee, 0xff); 68 hoverStyleAdd.backgroundColor = Color(0x88, 0x88, 0x88, 0xff); 69 focusStyleAdd.backgroundColor = Color(0x77, 0x77, 0x77, 0xff); 70 pressStyleAdd.backgroundColor = Color(0x55, 0x55, 0x55, 0xff); 71 disabledStyleAdd.backgroundColor = Color(0xaa, 0xaa, 0xaa, 0x55); 72 73 }; 74 75 GluiFilePicker.selectedStyleAdd.backgroundColor = Color(0xff, 0x51, 0x2f, 0xff); 76 77 }; 78 79 80 }