Skip to content

Commit 2fdd2aa

Browse files
author
César Cardoso
committed
feature/add-notes-fim
1 parent b210ac0 commit 2fdd2aa

File tree

2 files changed

+40
-39
lines changed

2 files changed

+40
-39
lines changed

Src/Notes/C4D.Wizard.Notes.View.dfm

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
object C4DWizardNotesView: TC4DWizardNotesView
22
Left = 0
33
Top = 0
4-
Caption = 'C4DWizardNotesView'
4+
Hint = 'Code4D-Wizard - Notes'
5+
Caption = 'Notes'
56
ClientHeight = 521
67
ClientWidth = 874
78
Color = clBtnFace
@@ -13,6 +14,7 @@ object C4DWizardNotesView: TC4DWizardNotesView
1314
KeyPreview = True
1415
OldCreateOrder = False
1516
Position = poScreenCenter
17+
ShowHint = True
1618
OnActivate = FormActivate
1719
OnClose = FormClose
1820
OnShow = FormShow
@@ -83,9 +85,11 @@ object C4DWizardNotesView: TC4DWizardNotesView
8385
Padding.Right = 2
8486
Padding.Bottom = 2
8587
TabOrder = 1
88+
ExplicitLeft = -5
89+
ExplicitTop = 494
8690
object Bevel2: TBevel
8791
AlignWithMargins = True
88-
Left = 327
92+
Left = 326
8993
Top = 2
9094
Width = 1
9195
Height = 22
@@ -95,8 +99,7 @@ object C4DWizardNotesView: TC4DWizardNotesView
9599
Margins.Bottom = 0
96100
Align = alLeft
97101
Shape = bsLeftLine
98-
ExplicitLeft = 447
99-
ExplicitTop = 0
102+
ExplicitLeft = 325
100103
end
101104
object Bevel3: TBevel
102105
AlignWithMargins = True
@@ -110,8 +113,6 @@ object C4DWizardNotesView: TC4DWizardNotesView
110113
Margins.Bottom = 0
111114
Align = alLeft
112115
Shape = bsLeftLine
113-
ExplicitLeft = 54
114-
ExplicitTop = 0
115116
end
116117
object btnColor: TButton
117118
AlignWithMargins = True
@@ -131,12 +132,13 @@ object C4DWizardNotesView: TC4DWizardNotesView
131132
ShowHint = True
132133
TabOrder = 0
133134
OnClick = btnColorClick
135+
ExplicitLeft = 83
134136
end
135137
object cBoxSizeFont: TComboBox
136138
AlignWithMargins = True
137139
Left = 134
138140
Top = 2
139-
Width = 39
141+
Width = 38
140142
Height = 21
141143
Cursor = crHandPoint
142144
Margins.Left = 0
@@ -164,10 +166,11 @@ object C4DWizardNotesView: TC4DWizardNotesView
164166
'48'
165167
'72'
166168
'96')
169+
ExplicitLeft = 132
167170
end
168171
object btnAlignmentLeft: TButton
169172
AlignWithMargins = True
170-
Left = 332
173+
Left = 331
171174
Top = 2
172175
Width = 22
173176
Height = 22
@@ -178,17 +181,16 @@ object C4DWizardNotesView: TC4DWizardNotesView
178181
Margins.Bottom = 0
179182
Align = alLeft
180183
ImageIndex = 7
181-
ImageMargins.Left = 1
182184
Images = ImageList1
183185
ParentShowHint = False
184186
ShowHint = True
185187
TabOrder = 3
186188
OnClick = btnAlignmentLeftClick
187-
ExplicitLeft = 282
189+
ExplicitLeft = 329
188190
end
189191
object btnAlignmentCenter: TButton
190192
AlignWithMargins = True
191-
Left = 357
193+
Left = 356
192194
Top = 2
193195
Width = 22
194196
Height = 22
@@ -199,17 +201,16 @@ object C4DWizardNotesView: TC4DWizardNotesView
199201
Margins.Bottom = 0
200202
Align = alLeft
201203
ImageIndex = 8
202-
ImageMargins.Left = 1
203204
Images = ImageList1
204205
ParentShowHint = False
205206
ShowHint = True
206207
TabOrder = 2
207208
OnClick = btnAlignmentCenterClick
208-
ExplicitLeft = 307
209+
ExplicitLeft = 354
209210
end
210211
object btnAlignmentRight: TButton
211212
AlignWithMargins = True
212-
Left = 382
213+
Left = 381
213214
Top = 2
214215
Width = 22
215216
Height = 22
@@ -220,17 +221,16 @@ object C4DWizardNotesView: TC4DWizardNotesView
220221
Margins.Bottom = 0
221222
Align = alLeft
222223
ImageIndex = 9
223-
ImageMargins.Left = 1
224224
Images = ImageList1
225225
ParentShowHint = False
226226
ShowHint = True
227227
TabOrder = 4
228228
OnClick = btnAlignmentRightClick
229-
ExplicitLeft = 332
229+
ExplicitLeft = 379
230230
end
231231
object btnUnderline: TButton
232232
AlignWithMargins = True
233-
Left = 276
233+
Left = 275
234234
Top = 2
235235
Width = 22
236236
Height = 22
@@ -242,17 +242,16 @@ object C4DWizardNotesView: TC4DWizardNotesView
242242
Align = alLeft
243243
ImageAlignment = iaCenter
244244
ImageIndex = 12
245-
ImageMargins.Left = 1
246245
Images = ImageList1
247246
ParentShowHint = False
248247
ShowHint = True
249248
TabOrder = 5
250249
OnClick = btnUnderlineClick
251-
ExplicitLeft = 226
250+
ExplicitLeft = 274
252251
end
253252
object btnItalic: TButton
254253
AlignWithMargins = True
255-
Left = 251
254+
Left = 250
256255
Top = 2
257256
Width = 22
258257
Height = 22
@@ -263,17 +262,16 @@ object C4DWizardNotesView: TC4DWizardNotesView
263262
Margins.Bottom = 0
264263
Align = alLeft
265264
ImageIndex = 11
266-
ImageMargins.Left = 1
267265
Images = ImageList1
268266
ParentShowHint = False
269267
ShowHint = True
270268
TabOrder = 6
271269
OnClick = btnItalicClick
272-
ExplicitLeft = 201
270+
ExplicitLeft = 249
273271
end
274272
object btnBold: TButton
275273
AlignWithMargins = True
276-
Left = 226
274+
Left = 225
277275
Top = 2
278276
Width = 22
279277
Height = 22
@@ -284,13 +282,12 @@ object C4DWizardNotesView: TC4DWizardNotesView
284282
Margins.Bottom = 0
285283
Align = alLeft
286284
ImageIndex = 10
287-
ImageMargins.Left = 1
288285
Images = ImageList1
289286
ParentShowHint = False
290287
ShowHint = True
291288
TabOrder = 7
292289
OnClick = btnBoldClick
293-
ExplicitLeft = 176
290+
ExplicitLeft = 224
294291
end
295292
object btnFont: TButton
296293
AlignWithMargins = True
@@ -306,12 +303,12 @@ object C4DWizardNotesView: TC4DWizardNotesView
306303
Align = alLeft
307304
ImageAlignment = iaCenter
308305
ImageIndex = 6
309-
ImageMargins.Left = 1
310306
Images = ImageList1
311307
ParentShowHint = False
312308
ShowHint = True
313309
TabOrder = 8
314310
OnClick = btnFontClick
311+
ExplicitLeft = 108
315312
end
316313
object btnOpen: TButton
317314
AlignWithMargins = True
@@ -372,7 +369,7 @@ object C4DWizardNotesView: TC4DWizardNotesView
372369
end
373370
object btnStrikethrough: TButton
374371
AlignWithMargins = True
375-
Left = 301
372+
Left = 300
376373
Top = 2
377374
Width = 22
378375
Height = 22
@@ -389,11 +386,11 @@ object C4DWizardNotesView: TC4DWizardNotesView
389386
ShowHint = True
390387
TabOrder = 12
391388
OnClick = btnStrikethroughClick
392-
ExplicitLeft = 251
389+
ExplicitLeft = 299
393390
end
394391
object btnFontSizeDecrease: TButton
395392
AlignWithMargins = True
396-
Left = 176
393+
Left = 175
397394
Top = 2
398395
Width = 22
399396
Height = 22
@@ -404,17 +401,16 @@ object C4DWizardNotesView: TC4DWizardNotesView
404401
Margins.Bottom = 0
405402
Align = alLeft
406403
ImageIndex = 14
407-
ImageMargins.Left = 1
408404
Images = ImageList1
409405
ParentShowHint = False
410406
ShowHint = True
411407
TabOrder = 13
412408
OnClick = btnFontSizeDecreaseClick
413-
ExplicitTop = 3
409+
ExplicitLeft = 169
414410
end
415411
object btnFontSizeIncrease: TButton
416412
AlignWithMargins = True
417-
Left = 201
413+
Left = 200
418414
Top = 2
419415
Width = 22
420416
Height = 22
@@ -425,13 +421,12 @@ object C4DWizardNotesView: TC4DWizardNotesView
425421
Margins.Bottom = 0
426422
Align = alLeft
427423
ImageIndex = 15
428-
ImageMargins.Left = 1
429424
Images = ImageList1
430425
ParentShowHint = False
431426
ShowHint = True
432427
TabOrder = 14
433428
OnClick = btnFontSizeIncreaseClick
434-
ExplicitTop = 3
429+
ExplicitLeft = 194
435430
end
436431
end
437432
object ImageList1: TImageList

Src/Notes/C4D.Wizard.Notes.View.pas

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ constructor TC4DWizardNotesView.Create(AOwner: TComponent);
144144

145145
procedure TC4DWizardNotesView.FormShow(Sender: TObject);
146146
begin
147-
Self.Constraints.MinWidth := 300;
148-
Self.Constraints.MinHeight := 300;
147+
Self.Constraints.MinWidth := 100;
148+
Self.Constraints.MinHeight := 100;
149149

150150
RichEdit.Font.Color := TC4DWizardUtilsOTA.ActiveThemeColorDefaul;
151151
Self.ReadFromFile;
@@ -293,9 +293,15 @@ procedure TC4DWizardNotesView.btnFontSizeIncreaseClick(Sender: TObject);
293293

294294
procedure TC4DWizardNotesView.ChangeFontSize(const AValue: Integer);
295295
begin
296-
RichEdit.SelAttributes.Size := RichEdit.SelAttributes.Size + AValue;
297-
cBoxSizeFont.Text := IntToStr(RichEdit.SelAttributes.Size);
298-
RichEdit.SetFocus;
296+
try
297+
if(RichEdit.SelAttributes.Size <= 7)then
298+
Exit;
299+
300+
RichEdit.SelAttributes.Size := RichEdit.SelAttributes.Size + AValue;
301+
cBoxSizeFont.Text := IntToStr(RichEdit.SelAttributes.Size);
302+
finally
303+
RichEdit.SetFocus;
304+
end;
299305
end;
300306

301307
procedure TC4DWizardNotesView.btnItalicClick(Sender: TObject);

0 commit comments

Comments
 (0)