mirror of https://github.com/buggins/dlangui.git
fix xcb build; update button resources
This commit is contained in:
parent
27d2f64735
commit
67b4534b70
|
@ -161,11 +161,22 @@
|
||||||
<Compile Include="3rdparty\X11\xcb\xvmc.d" />
|
<Compile Include="3rdparty\X11\xcb\xvmc.d" />
|
||||||
<Compile Include="3rdparty\X11\keysymdef.d" />
|
<Compile Include="3rdparty\X11\keysymdef.d" />
|
||||||
<Compile Include="3rdparty\X11\xcb\image.d" />
|
<Compile Include="3rdparty\X11\xcb\image.d" />
|
||||||
|
<Compile Include="src\dlangui\core\events.d" />
|
||||||
|
<Compile Include="..\DerelictFI\source\derelict\freeimage\freeimage.d">
|
||||||
|
<Link>3rdparty\DerelictFI\freeimage.d</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\DerelictFI\source\derelict\freeimage\functions.d">
|
||||||
|
<Link>3rdparty\DerelictFI\functions.d</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\DerelictFI\source\derelict\freeimage\types.d">
|
||||||
|
<Link>3rdparty\DerelictFI\types.d</Link>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="src\dlangui\platforms\x11\" />
|
<Folder Include="src\dlangui\platforms\x11\" />
|
||||||
<Folder Include="3rdparty\DerelictUtil\" />
|
<Folder Include="3rdparty\DerelictUtil\" />
|
||||||
<Folder Include="3rdparty\DerelictGL3\" />
|
<Folder Include="3rdparty\DerelictGL3\" />
|
||||||
<Folder Include="3rdparty\DerelictFT\" />
|
<Folder Include="3rdparty\DerelictFT\" />
|
||||||
|
<Folder Include="3rdparty\DerelictFI\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
|
@ -32,6 +32,12 @@ class XCBWindow : Window {
|
||||||
~this() {
|
~this() {
|
||||||
Log.d("Destroying window");
|
Log.d("Destroying window");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// request window redraw
|
||||||
|
override void invalidate() {
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
bool create() {
|
bool create() {
|
||||||
uint mask;
|
uint mask;
|
||||||
uint values[2];
|
uint values[2];
|
||||||
|
@ -169,11 +175,11 @@ class XCBWindow : Window {
|
||||||
cast(void*)title);
|
cast(void*)title);
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorDrawBuf _drawbuf;
|
void redraw() {
|
||||||
void processExpose(xcb_expose_event_t * event) {
|
|
||||||
if (!_drawbuf)
|
if (!_drawbuf)
|
||||||
_drawbuf = new ColorDrawBuf(_dx, _dy);
|
_drawbuf = new ColorDrawBuf(_dx, _dy);
|
||||||
_drawbuf.resize(_dx, _dy);
|
_drawbuf.resize(_dx, _dy);
|
||||||
|
_drawbuf.fill(_backgroundColor);
|
||||||
Log.d("calling createImage");
|
Log.d("calling createImage");
|
||||||
createImage();
|
createImage();
|
||||||
Log.d("done createImage");
|
Log.d("done createImage");
|
||||||
|
@ -188,6 +194,11 @@ class XCBWindow : Window {
|
||||||
xcb_flush(_xcbconnection);
|
xcb_flush(_xcbconnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ColorDrawBuf _drawbuf;
|
||||||
|
void processExpose(xcb_expose_event_t * event) {
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private __gshared xcb_connection_t * _xcbconnection;
|
private __gshared xcb_connection_t * _xcbconnection;
|
||||||
|
|
|
@ -502,8 +502,10 @@ private __gshared Theme _currentTheme;
|
||||||
|
|
||||||
static this() {
|
static this() {
|
||||||
_currentTheme = new Theme("default");
|
_currentTheme = new Theme("default");
|
||||||
Style button = _currentTheme.createSubstyle("BUTTON").backgroundImageId("btn_default_normal").alignment(Align.Center);
|
Style button = _currentTheme.createSubstyle("BUTTON").backgroundImageId("btn_default_small_normal").alignment(Align.Center);
|
||||||
Style text = _currentTheme.createSubstyle("TEXT").margins(Rect(3,3,3,3)).padding(Rect(3,3,3,3));
|
Style text = _currentTheme.createSubstyle("TEXT").margins(Rect(3,3,3,3)).padding(Rect(3,3,3,3));
|
||||||
button.createState(State.Pressed, State.Pressed).backgroundImageId("btn_default_pressed");
|
button.createState(State.Disabled | State.Focused, State.Disabled | State.Focused).backgroundImageId("btn_default_small_normal_disable_focused");
|
||||||
button.createState(State.Focused, State.Focused).backgroundImageId("btn_default_selected");
|
button.createState(State.Disabled, State.Disabled).backgroundImageId("btn_default_small_normal_disable");
|
||||||
|
button.createState(State.Pressed, State.Pressed).backgroundImageId("btn_default_small_pressed");
|
||||||
|
button.createState(State.Focused, State.Focused).backgroundImageId("btn_default_small_selected");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue