Add style for LogWidget.

This commit is contained in:
and3md 2017-11-12 18:43:39 +01:00
parent 413fd9a753
commit 0c1af2b7b3
4 changed files with 18 additions and 4 deletions

View File

@ -3504,13 +3504,10 @@ class LogWidget : EditBox {
this(string ID) {
super(ID);
styleId = STYLE_LOG_WIDGET;
_scrollLock = true;
_enableScrollAfterText = false;
enabled = false;
fontSize = makePointSize(9);
//fontFace = "Consolas,Lucida Console,Courier New";
fontFace = "Menlo,Consolas,DejaVuSansMono,DejaVu Sans Mono,Lucida Sans Typewriter,Courier New,Lucida Console";
fontFamily = FontFamily.MonoSpace;
minFontSize(pointsToPixels(6)).maxFontSize(pointsToPixels(32)); // allow font zoom with Ctrl + MouseWheel
onThemeChanged();
}

View File

@ -111,6 +111,8 @@ immutable string STYLE_LIST_ITEM = "LIST_ITEM";
immutable string STYLE_EDIT_LINE = "EDIT_LINE";
/// standard style id for EditBox
immutable string STYLE_EDIT_BOX = "EDIT_BOX";
/// standard style id for LogWidget
immutable string STYLE_LOG_WIDGET = "LOG_WIDGET";
/// standard style id for lists
immutable string STYLE_LIST_BOX = "LIST_BOX";
/// standard style id for StringGrid

View File

@ -220,6 +220,9 @@
<style id="EDIT_BOX"
backgroundImageId="editbox_background_dark"
/>
<style id="LOG_WIDGET"
backgroundImageId="editbox_background_dark"
/>
<style id="LIST_BOX"
backgroundImageId="editbox_background_dark"
/>

View File

@ -317,6 +317,18 @@
layoutWidth="FILL_PARENT"
layoutHeight="FILL_PARENT"
/>
<style id="LOG_WIDGET"
fontFace="Menlo,Consolas,DejaVuSansMono,DejaVu Sans Mono,Lucida Sans Typewriter,Courier New,Lucida Console"
fontSize="9pt"
fontFamily="MonoSpace"
backgroundImageId="editbox_background"
padding="2,2,2,2"
margins="2,2,2,2"
minWidth="100"
minHeight="60"
layoutWidth="FILL_PARENT"
layoutHeight="FILL_PARENT"
/>
<style id="LIST_BOX"
backgroundImageId="editbox_background"
padding="2,2,2,2"