Skip to content

Commit

Permalink
Fixed changing font for the system. Enable changig font for all dialo…
Browse files Browse the repository at this point in the history
…g forms too.(2)
  • Loading branch information
fredvs committed Apr 13, 2020
1 parent 6405533 commit 45b2d31
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 174 deletions.
5 changes: 4 additions & 1 deletion src/confideu.pas
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ tconfideufo = class(tmseform)
implementation

uses
confideu_mfm, main, messageform, sourceform, finddialogform,
confideu_mfm, main, messageform, sourceform, finddialogform, targetconsole,
projecttreeform, commandorform, dialogfiles;

procedure tconfideufo.zorderhandle(const Sender: TObject);
Expand Down Expand Up @@ -235,6 +235,9 @@ procedure tconfideufo.onchangefont;

mainfo.font.height := fontsize.value;

targetconsolefo.grid.font.height := fontsize.value;


ratio := fontsize.value / 12;

if assigned(dialogfilesfo) then
Expand Down
2 changes: 1 addition & 1 deletion src/ideU.pas
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

if application.terminated then exit;

application.createform(tconfideufo, confideufo);
application.createform(tconfideufo, confideufo);
application.createform(tconfmseguifo, confmseguifo);
application.createform(tconffpguifo, conffpguifo);
application.createform(tconfcompilerfo, confcompilerfo);
Expand Down
34 changes: 17 additions & 17 deletions src/ideU.prj
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ stoponexception=0
valuehints=1
activateonbreak=1
raiseonbreak=1
showconsole=1
showconsole=0
externalconsole=0
settty=1
gdbdownload=0
Expand Down Expand Up @@ -1184,7 +1184,7 @@ line=24
765
898
2507
5173
5174
1882
address=24
4785304
Expand Down Expand Up @@ -1662,19 +1662,19 @@ windowlayout=616
x=0
y=0
cx=205
cy=452
cy=445
rcx=0
rcy=0
[projecttreefo.grid]
propcolwidthref=88
propcolwidthref=73
width0=117
sortdescend0=0
width1=82
width1=67
sortdescend1=0
sorted=0
col=1
row=-1073741823
rowheight=16
rowheight=27
[stackfo]
splitdir=0
useroptions=268460137
Expand Down Expand Up @@ -1758,7 +1758,7 @@ windowlayout=616
[objectinspectorfo]
splitdir=0
useroptions=268451947
stackedunder=componentpalettefo
stackedunder=
parent=
mdistate=0
nx=0
Expand Down Expand Up @@ -1871,9 +1871,9 @@ windowlayout=616
ncx=0
ncy=0
x=0
y=509
y=501
cx=1147
cy=91
cy=90
rcx=0
rcy=0
[componentstorefo]
Expand Down Expand Up @@ -1942,7 +1942,7 @@ windowlayout=616
[componentpalettefo]
splitdir=0
useroptions=268460139
stackedunder=_mse_actionsmo_mse_
stackedunder=
parent=
mdistate=3
nx=0
Expand Down Expand Up @@ -1973,7 +1973,7 @@ windowlayout=616
x=0
y=0
cx=1147
cy=51
cy=50
rcx=0
rcy=0
[debuggerfo.basedock]
Expand All @@ -1988,7 +1988,7 @@ windowlayout=616
ncy=52
x=0
y=0
cx=1147
cx=1140
cy=54
rcx=0
rcy=0
Expand Down Expand Up @@ -2019,7 +2019,7 @@ windowlayout=616
x=208
y=0
cx=939
cy=452
cy=445
rcx=0
rcy=0
[sourcefo.files_tab]
Expand All @@ -2037,7 +2037,7 @@ windowlayout=616
irqoff=0
splitdir=0
useroptions=268451947
stackedunder=confcompilerfo
stackedunder=_mse_sourcefo_mse_
parent=
mdistate=0
nx=0
Expand Down Expand Up @@ -2113,7 +2113,7 @@ windowlayout=616
[_mse_sourcepage_mse_]
splitdir=0
useroptions=268451963
stackedunder=objectinspectorfo
stackedunder=confcompilerfo
parent=
mdistate=3
nx=0
Expand All @@ -2140,9 +2140,9 @@ windowlayout=616
ncx=0
ncy=0
x=0
y=54
y=53
cx=1147
cy=452
cy=445
rcx=0
rcy=0
[targetconsole]
Expand Down
1 change: 1 addition & 0 deletions src/main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4366,6 +4366,7 @@ procedure tmainfo.manfocreated(const Sender: TObject);
begin
TDummyThread.Create(False);
// setstattext('Light theme is set.', mtk_flat);
writeln('Hello les amis');
end;

procedure tmainfo.onbeauty(const Sender: TObject);
Expand Down
18 changes: 11 additions & 7 deletions src/targetconsole.mfm
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ object targetconsolefo: ttargetconsolefo
384
)
dragdock.optionsdock = [od_savepos, od_canmove, od_canfloat, od_candock, od_propsize, od_captionhint]
font.color = -1610612730
font.name = 'stf_default'
font.localprops = []
font.localprops = [flp_color]
options = [fo_savepos, fo_savestate]
statfile = mainfo.projectstatfile
caption = 'Target Console'
Expand Down Expand Up @@ -95,8 +96,11 @@ object targetconsolefo: ttargetconsolefo
bounds_cx = 581
bounds_cy = 384
anchors = []
fontempty.name = 'stf_empty'
fontempty.localprops = []
font.color = -1610612730
font.colorbackground = 2171169
font.name = 'stf_courier'
font.xscale = 1
font.localprops = [flp_color, flp_colorbackground, flp_colorselect, flp_xscale]
optionsgrid = [og_focuscellonenter, og_autofirstrow, og_colchangeontabkey, og_wrapcol, og_autopopup]
rowcountmax = 5000
datacols.count = 1
Expand All @@ -109,19 +113,19 @@ object targetconsolefo: ttargetconsolefo
dataclass = tgridrichstringdatalist
end>
datarowlinewidth = 0
datarowheight = 15
reffontheight = 15
datarowheight = 14
reffontheight = 14
object terminal: tterminal
taborder = 1
visible = False
bounds_x = 0
bounds_y = 0
bounds_cx = 3000
bounds_cy = 15
bounds_cy = 14
optionsedit1 = [oe1_autopopupmenu, oe1_keyexecute, oe1_savestate, oe1_checkvalueafterstatread]
maxchars = 120
onsendtext = sendtext
reffontheight = 15
reffontheight = 14
end
end
object popupmen: tpopupmenu
Expand Down
16 changes: 10 additions & 6 deletions src/targetconsole.pas
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ MSEide Copyright (c) 1999-2013 by Martin Schreiber
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
Expand All @@ -21,13 +21,17 @@
interface
uses
msegui,mseclasses,mseforms,mseterminal,msewidgetgrid,msestrings,msedatalist,
classes,mclasses,msemenus,msestat,msetypes;
classes,mclasses,msemenus,msestat,msetypes, mseact, mseapplication,
msedataedits, msedragglob, msedropdownlist, mseedit, mseglob, msegraphics,
msegraphutils, msegrids, msegridsglob, mseguiglob, mseificomp, mseificompglob,
mseifiglob, msestatfile, msestream, sysutils, mseeditglob, mserichstring,
msetextedit;

type
ttargetconsolefo = class(tdockform)
terminal: tterminal;
grid: twidgetgrid;
popupmen: tpopupmenu;
grid: twidgetgrid;
terminal: tterminal;
procedure sendtext(const sender: tobject; var atext: msestring;
var donotsend: Boolean);
procedure targetconsoleonidle(var again: Boolean);
Expand All @@ -45,12 +49,12 @@ ttargetconsolefo = class(tdockform)
procedure repeatfind;
procedure findback;
end;

var
targetconsolefo: ttargetconsolefo;

procedure updatestat(const statfiler: tstatfiler);

implementation
uses
targetconsole_mfm,msegdbutils,main,finddialogform,projectoptionsform,
Expand Down

0 comments on commit 45b2d31

Please sign in to comment.