Skip to content

Commit

Permalink
Switch to undead xml
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimMaple committed Oct 8, 2022
1 parent c9ccaad commit 91fbca9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion dub.json
Expand Up @@ -30,7 +30,8 @@
"excludedSourceFiles-windows": ["3rdparty/fontconfig/*"],

"dependencies": {
"inilike": "~>1.2.1"
"inilike": "~>1.2.1",
"undead": "~>1.1.7"
},

"subPackages": [
Expand Down
8 changes: 4 additions & 4 deletions src/dlangui/graphics/resources.d
Expand Up @@ -101,7 +101,7 @@ import dlangui.graphics.colors;
import dlangui.graphics.drawbuf;
import std.file;
import std.algorithm;
import std.xml;
import undead.xml;
import std.conv;
import std.string;
import std.path;
Expand Down Expand Up @@ -1222,8 +1222,8 @@ class CombinedDrawable : Drawable {

this(uint backgroundColor, string backgroundImageId, string borderDescription, string boxShadowDescription) {
boxShadow = boxShadowDescription !is null ? drawableCache.get("#box-shadow," ~ boxShadowDescription) : new EmptyDrawable;
background =
(backgroundImageId !is null) ? drawableCache.get(backgroundImageId) :
background =
(backgroundImageId !is null) ? drawableCache.get(backgroundImageId) :
(!backgroundColor.isFullyTransparentColor) ? new SolidFillDrawable(backgroundColor) : null;
if (background is null)
background = new EmptyDrawable;
Expand All @@ -1245,7 +1245,7 @@ class CombinedDrawable : Drawable {
@property override int width() { return background.width + border.padding.left + border.padding.right; }
@property override int height() { return background.height + border.padding.top + border.padding.bottom; }
@property override Rect padding() {
return Rect(background.padding.left + border.padding.left, background.padding.top + border.padding.top,
return Rect(background.padding.left + border.padding.left, background.padding.top + border.padding.top,
background.padding.right + border.padding.right, background.padding.bottom + border.padding.bottom);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/dlangui/widgets/styles.d
Expand Up @@ -25,9 +25,9 @@ module dlangui.widgets.styles;

import dlangui.core.config;

private import std.xml;
private import std.string;
private import std.algorithm;
import undead.xml;
import std.string;
import std.algorithm;

import dlangui.core.types;
import dlangui.graphics.colors;
Expand Down

0 comments on commit 91fbca9

Please sign in to comment.