@@ -82,6 +82,33 @@ public class QlibCheckBox : CheckBox
8282 [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
8383 public new bool AutoCheck { get { return base . AutoCheck ; } set { } }
8484
85+ [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
86+ public new Font Font { get { return base . Font ; } set { } }
87+
88+ [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
89+ public new bool UseWaitCursor { get { return base . UseWaitCursor ; } set { } }
90+
91+ [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
92+ public new bool UseVisualStyleBackColor { get { return base . UseVisualStyleBackColor ; } set { } }
93+
94+ [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
95+ public new bool UseMnemonic { get { return base . UseMnemonic ; } set { } }
96+
97+ [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
98+ public new bool AllowDrop { get { return base . AllowDrop ; } set { } }
99+
100+ [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
101+ public new bool AutoEllipsis { get { return base . AutoEllipsis ; } set { } }
102+
103+ [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
104+ public new bool CausesValidation { get { return base . CausesValidation ; } set { } }
105+
106+ [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
107+ public new bool UseCompatibleTextRendering { get { return base . UseCompatibleTextRendering ; } set { } }
108+
109+ [ Browsable ( false ) , EditorBrowsable ( EditorBrowsableState . Never ) ]
110+ public new ContentAlignment TextAlign { get { return base . TextAlign ; } set { } }
111+
85112 #endregion
86113
87114 #region PUBLIC PROPS
@@ -99,27 +126,36 @@ public bool DarkMode
99126
100127 public QlibCheckBox ( )
101128 {
102- base . AutoCheck = true ;
103- base . ThreeState = false ;
104- base . MaximumSize = DefaultMaximumSize ;
105- base . MinimumSize = DefaultMinimumSize ;
106- base . Dock = DockStyle . None ;
107- base . AutoSize = false ;
108- base . RightToLeft = RightToLeft . No ;
109- base . Padding = Padding . Empty ;
110- base . ImageKey = null ;
111- base . ImageIndex = 0 ;
112- base . ImageAlign = ContentAlignment . MiddleCenter ;
113- base . FlatStyle = FlatStyle . System ;
114- base . CheckState = CheckState . Unchecked ;
115- base . Cursor = Cursors . Default ;
116- base . Image = null ;
117- base . CheckAlign = ContentAlignment . MiddleLeft ;
118- base . BackgroundImageLayout = ImageLayout . None ;
119- base . BackgroundImage = null ;
120- base . BackColor = ThemeMan . LightBackColor ;
121- base . ForeColor = Color . Black ;
122129 base . Appearance = Appearance . Normal ;
130+ base . ForeColor = Color . Black ;
131+ base . BackColor = ThemeMan . LightBackColor ;
132+ base . BackgroundImage = null ;
133+ base . BackgroundImageLayout = ImageLayout . None ;
134+ base . CheckAlign = ContentAlignment . MiddleLeft ;
135+ base . Image = null ;
136+ base . Cursor = Cursors . Default ;
137+ base . CheckState = CheckState . Unchecked ;
138+ base . FlatStyle = FlatStyle . System ;
139+ base . ImageAlign = ContentAlignment . MiddleCenter ;
140+ base . ImageIndex = 0 ;
141+ base . ImageKey = null ;
142+ base . Padding = Padding . Empty ;
143+ base . RightToLeft = RightToLeft . No ;
144+ base . AutoSize = false ;
145+ base . Dock = DockStyle . None ;
146+ base . MinimumSize = DefaultMinimumSize ;
147+ base . MaximumSize = DefaultMaximumSize ;
148+ base . ThreeState = false ;
149+ base . AutoCheck = true ;
150+ base . Font = ThemeMan . DefaultFont ;
151+ base . UseWaitCursor = false ;
152+ base . UseVisualStyleBackColor = true ;
153+ base . UseMnemonic = false ;
154+ base . AllowDrop = false ;
155+ base . AutoEllipsis = false ;
156+ base . CausesValidation = false ;
157+ base . UseCompatibleTextRendering = false ;
158+ base . TextAlign = ContentAlignment . MiddleLeft ;
123159 }
124160
125161 #endregion
@@ -179,7 +215,6 @@ protected override void OnPaint(PaintEventArgs e)
179215 if ( darkMode )
180216 {
181217 int top = ( Height / 2 ) - 9 ;
182-
183218 e . Graphics . Clear ( BackColor ) ;
184219
185220 if ( pressed )
@@ -198,36 +233,17 @@ protected override void OnPaint(PaintEventArgs e)
198233 }
199234 }
200235
201- if ( Focused )
202- {
203- e . Graphics . DrawRectangle ( new Pen ( ThemeMan . BorderColor , 2 ) , new Rectangle ( 1 , top + 3 , 13 , 13 ) ) ;
204- }
236+ if ( Focused ) e . Graphics . DrawRectangle ( new Pen ( ThemeMan . BorderColor , 2 ) , new Rectangle ( 1 , top + 3 , 13 , 13 ) ) ;
205237
206238 if ( Checked )
207239 {
208240 e . Graphics . SmoothingMode = SmoothingMode . AntiAlias ;
209-
210- if ( Enabled )
211- {
212- e . Graphics . DrawLine ( new Pen ( ForeColor , 2 ) , 2 , top + 9 , 5 , top + 12 ) ;
213- e . Graphics . DrawLine ( new Pen ( ForeColor , 2 ) , 5 , top + 13 , 12 , top + 6 ) ;
214- }
215- else
216- {
217- e . Graphics . DrawLine ( new Pen ( ThemeMan . BorderColor , 2 ) , 2 , top + 9 , 5 , top + 12 ) ;
218- e . Graphics . DrawLine ( new Pen ( ThemeMan . BorderColor , 2 ) , 5 , top + 13 , 12 , top + 6 ) ;
219- }
241+ e . Graphics . DrawLine ( new Pen ( Enabled ? ForeColor : ThemeMan . BorderColor , 2 ) , 2 , top + 9 , 5 , top + 12 ) ;
242+ e . Graphics . DrawLine ( new Pen ( Enabled ? ForeColor : ThemeMan . BorderColor , 2 ) , 5 , top + 13 , 12 , top + 6 ) ;
220243 }
221244
222245 e . Graphics . TextRenderingHint = TextRenderingHint . ClearTypeGridFit ;
223- if ( Enabled )
224- {
225- e . Graphics . DrawString ( Text , Font , new SolidBrush ( ForeColor ) , 22 , top ) ;
226- }
227- else
228- {
229- e . Graphics . DrawString ( Text , Font , new SolidBrush ( ThemeMan . BorderColor ) , 22 , top ) ;
230- }
246+ e . Graphics . DrawString ( Text , Font , new SolidBrush ( Enabled ? ForeColor : ThemeMan . BorderColor ) , 22 , top ) ;
231247 }
232248 else
233249 {
0 commit comments