protected override ButtonBaseAdapter.LayoutOptions Layout(PaintEventArgs e)
 {
     ButtonBaseAdapter.LayoutOptions options = this.CommonLayout();
     options.checkSize    = (int)(12f * CheckableControlBaseAdapter.GetDpiScaleRatio(e.Graphics));
     options.shadowedText = false;
     return(options);
 }
 private ButtonBaseAdapter.LayoutOptions PaintLayout(PaintEventArgs e, bool up)
 {
     ButtonBaseAdapter.LayoutOptions options = this.CommonLayout();
     options.textOffset          = !up;
     options.everettButtonCompat = !Application.RenderWithVisualStyles;
     return(options);
 }
 protected override ButtonBaseAdapter.LayoutOptions Layout(PaintEventArgs e)
 {
     ButtonBaseAdapter.LayoutOptions options = base.Layout(e);
     if (!base.Control.MouseIsDown && !base.Control.MouseIsOver)
     {
         options.shadowedText = true;
     }
     return(options);
 }
 internal override ButtonBaseAdapter.LayoutOptions CommonLayout()
 {
     ButtonBaseAdapter.LayoutOptions options = base.CommonLayout();
     options.checkAlign   = this.Control.CheckAlign;
     options.textOffset   = false;
     options.shadowedText = !this.Control.Enabled;
     options.layoutRTL    = RightToLeft.Yes == this.Control.RightToLeft;
     return(options);
 }
 private ButtonBaseAdapter.LayoutOptions PaintPopupLayout(PaintEventArgs e, bool up, int paintedBorder)
 {
     ButtonBaseAdapter.LayoutOptions options = this.CommonLayout();
     options.borderSize   = paintedBorder;
     options.paddingSize  = 2 - paintedBorder;
     options.hintTextUp   = false;
     options.textOffset   = !up;
     options.shadowedText = SystemInformation.HighContrast;
     return(options);
 }
 internal static ButtonBaseAdapter.LayoutOptions PaintPopupLayout(Graphics g, bool up, int paintedBorder, Rectangle clientRectangle, Padding padding, bool isDefault, Font font, string text, bool enabled, ContentAlignment textAlign, RightToLeft rtl)
 {
     ButtonBaseAdapter.LayoutOptions options = ButtonBaseAdapter.CommonLayout(clientRectangle, padding, isDefault, font, text, enabled, textAlign, rtl);
     options.borderSize   = paintedBorder;
     options.paddingSize  = 2 - paintedBorder;
     options.hintTextUp   = false;
     options.textOffset   = !up;
     options.shadowedText = SystemInformation.HighContrast;
     return(options);
 }
 internal static ButtonBaseAdapter.LayoutOptions PaintFlatLayout(Graphics g, bool up, bool check, int borderSize, Rectangle clientRectangle, Padding padding, bool isDefault, Font font, string text, bool enabled, ContentAlignment textAlign, RightToLeft rtl)
 {
     ButtonBaseAdapter.LayoutOptions options = ButtonBaseAdapter.CommonLayout(clientRectangle, padding, isDefault, font, text, enabled, textAlign, rtl);
     options.borderSize        = borderSize + (check ? 1 : 0);
     options.paddingSize       = check ? 1 : 2;
     options.focusOddEvenFixup = false;
     options.textOffset        = !up;
     options.shadowedText      = SystemInformation.HighContrast;
     return(options);
 }
 private ButtonBaseAdapter.LayoutOptions PaintFlatLayout(PaintEventArgs e, bool up, bool check, int borderSize)
 {
     ButtonBaseAdapter.LayoutOptions options = this.CommonLayout();
     options.borderSize        = borderSize + (check ? 1 : 0);
     options.paddingSize       = check ? 1 : 2;
     options.focusOddEvenFixup = false;
     options.textOffset        = !up;
     options.shadowedText      = SystemInformation.HighContrast;
     return(options);
 }
Esempio n. 9
0
 internal override ButtonBaseAdapter.LayoutOptions CommonLayout()
 {
     ButtonBaseAdapter.LayoutOptions options = base.CommonLayout();
     options.growBorderBy1PxWhenDefault = false;
     options.borderSize        = 0;
     options.paddingSize       = 0;
     options.maxFocus          = false;
     options.focusOddEvenFixup = true;
     options.checkSize         = 13;
     return(options);
 }
Esempio n. 10
0
 internal static ButtonBaseAdapter.LayoutOptions PaintPopupLayout(Graphics g, bool show3D, int checkSize, Rectangle clientRectangle, Padding padding, bool isDefault, Font font, string text, bool enabled, ContentAlignment textAlign, RightToLeft rtl)
 {
     ButtonBaseAdapter.LayoutOptions options = ButtonBaseAdapter.CommonLayout(clientRectangle, padding, isDefault, font, text, enabled, textAlign, rtl);
     options.shadowedText = false;
     if (show3D)
     {
         options.checkSize = (int)((checkSize * CheckableControlBaseAdapter.GetDpiScaleRatio(g)) + 1f);
         return(options);
     }
     options.checkSize        = (int)(checkSize * CheckableControlBaseAdapter.GetDpiScaleRatio(g));
     options.checkPaddingSize = 1;
     return(options);
 }
Esempio n. 11
0
 private ButtonBaseAdapter.LayoutOptions PaintPopupLayout(PaintEventArgs e, bool show3D)
 {
     ButtonBaseAdapter.LayoutOptions options = this.CommonLayout();
     options.shadowedText = false;
     if (show3D)
     {
         options.checkSize = (int)((11f * CheckableControlBaseAdapter.GetDpiScaleRatio(e.Graphics)) + 1f);
         return(options);
     }
     options.checkSize        = (int)(11f * CheckableControlBaseAdapter.GetDpiScaleRatio(e.Graphics));
     options.checkPaddingSize = 1;
     return(options);
 }
Esempio n. 12
0
 protected override ButtonBaseAdapter.LayoutOptions Layout(PaintEventArgs e)
 {
     ButtonBaseAdapter.LayoutOptions options = this.CommonLayout();
     options.hintTextUp          = false;
     options.everettButtonCompat = !Application.RenderWithVisualStyles;
     if (Application.RenderWithVisualStyles)
     {
         using (Graphics graphics = WindowsFormsUtils.CreateMeasurementGraphics())
         {
             options.checkSize = RadioButtonRenderer.GetGlyphSize(graphics, RadioButtonRenderer.ConvertFromButtonState(base.GetState(), base.Control.MouseIsOver)).Width;
             return(options);
         }
     }
     options.checkSize = (int)(options.checkSize * CheckableControlBaseAdapter.GetDpiScaleRatio(e.Graphics));
     return(options);
 }
 internal override ButtonBaseAdapter.LayoutOptions CommonLayout()
 {
     ButtonBaseAdapter.LayoutOptions options = base.CommonLayout();
     options.checkAlign = this.Control.CheckAlign;
     return(options);
 }
 internal LayoutData(ButtonBaseAdapter.LayoutOptions options)
 {
     this.options = options;
 }