PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: WinFBE 1.4.4 on GitHub (August 18, 2017)  (Read 307 times)

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8088
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #15 on: August 18, 2017, 10:08:17 PM »

Yes, maybe I should switch over to the XPButton. Here are the things that I would need it to do:

- Be flat with no edges (or gradient)
- Allow me to draw a blue box around the edges to indicate a selected state (eg. the Match Case button).
- Allow hot tracking so when the mouse is over the button then the background color will change.
- Allow tooltips of course.

Also, a button control may look out of place in this situation because the pressing animation when the button is pressed down may not look right. Not sure.



« Last Edit: August 18, 2017, 10:12:22 PM by TechSupport »
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8088
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #16 on: August 18, 2017, 10:13:22 PM »

Maybe I just need to steal the drawing code from the xp button to see if I am doing anything wrong that could help the sharpness of the image.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Josť Roca

  • FireFly3 Registered User
  • Master FireFly Member
  • *
  • Posts: 2726
    • Josť Roca Software
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #17 on: August 18, 2017, 10:41:37 PM »

> - Be flat with no edges (or gradient)

This can be achieved using the BS_FLAT style and disabling theming:

Code: [Select]
DIM pXpButton1 AS CXpButton = CXpButton(@pWindow, IDC_BUTTON1, "", 50, 20, 26, 26, _
       WS_VISIBLE OR WS_TABSTOP OR BS_PUSHBUTTON OR BS_CENTER OR BS_VCENTER OR BS_FLAT)
pXpButton1.DisableTheming

> - Allow hot tracking so when the mouse is over the button then the background color will change.

You can set an hot image and the control will do hot tracking.

> - Allow tooltips of course.

No problem.

> - Allow me to draw a blue box around the edges to indicate a selected state (eg. the Match Case button).
> Also, a button control may look out of place in this situation because the pressing animation when the button is pressed down may not look right. Not sure.

This will require some changes in the drawing code. Maybe setting a new flag.

Josť Roca

  • FireFly3 Registered User
  • Master FireFly Member
  • *
  • Posts: 2726
    • Josť Roca Software
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #18 on: August 18, 2017, 11:03:22 PM »

Anyway, although the replace icon looks sharp, the case.ico does not, but this is because the original icon image is very poor.

Josť Roca

  • FireFly3 Registered User
  • Master FireFly Member
  • *
  • Posts: 2726
    • Josť Roca Software
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #19 on: August 18, 2017, 11:18:50 PM »

The attached icons must look better.

Josť Roca

  • FireFly3 Registered User
  • Master FireFly Member
  • *
  • Posts: 2726
    • Josť Roca Software
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #20 on: August 19, 2017, 02:38:49 AM »

Hi Paul,

See if changing

Code: [Select]
   ' Combobox to switch amongst the different build options
   ' Get the last button's rect and position the combobox immediately the right
'   HWND_FRMMAIN_COMBOBUILDS = _
'   pWindow->AddControl("COMBOBOX", hToolBar, IDC_FRMMAIN_COMBOBUILDS, "", _
'        pWindow->UnScaleX(rc.right) + 10, iif(pWindow->DPI = 96, 8, 2), 200, 20, _
'        WS_CHILD OR WS_VISIBLE OR WS_VSCROLL OR WS_BORDER OR WS_TABSTOP OR CBS_DROPDOWNLIST OR CBS_HASSTRINGS, _
'        WS_EX_LEFT Or WS_EX_LTRREADING Or WS_EX_RIGHTSCROLLBAR)
   HWND_FRMMAIN_COMBOBUILDS = _
   pWindow->AddControl("COMBOBOX", hToolBar, IDC_FRMMAIN_COMBOBUILDS, "", _
        pWindow->UnScaleX(rc.right + 10), pWindow->UnScaleX(10), 200, 20, _
        WS_CHILD OR WS_VISIBLE OR WS_VSCROLL OR WS_BORDER OR WS_TABSTOP OR CBS_DROPDOWNLIST OR CBS_HASSTRINGS, _
        WS_EX_LEFT Or WS_EX_LTRREADING Or WS_EX_RIGHTSCROLLBAR)

looks right at 96 DPI.

iif(pWindow->DPI = 96, 8, 2) is not correct because the value must be the same. What happens is that you must be trying it simulating 144 DPI with pWindow->DPI = 144, but that trick is not perfect because the window caption and the menu aren't scaled.
« Last Edit: August 19, 2017, 02:42:18 AM by Josť Roca »
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8088
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #21 on: August 19, 2017, 10:30:54 AM »

Thanks Jose, I made the change but I have used 8 instead of 10 because it seems to centre better in the toolbar. I also corrected a scaling error with the toolbar itself. I was using parenthesis around the scaling ratio calculation.

From:
   Dim cx As Long = 24 * (pWindow->DPI \ 96)

To:
   Dim cx As Long = 24 * pWindow->DPI \ 96

Code: [Select]
   ' Combobox to switch amongst the different build options
   HWND_FRMMAIN_COMBOBUILDS = _
   pWindow->AddControl("COMBOBOX", hToolBar, IDC_FRMMAIN_COMBOBUILDS, "", _
        pWindow->UnScaleX(rc.right + 10), pWindow->UnScaleY(8), 200, 20, _
        WS_CHILD OR WS_VISIBLE OR WS_VSCROLL OR WS_BORDER OR WS_TABSTOP OR CBS_DROPDOWNLIST OR CBS_HASSTRINGS, _
        WS_EX_LEFT Or WS_EX_LTRREADING Or WS_EX_RIGHTSCROLLBAR)

I have uploaded the new EXE's to GitHub.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8088
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #22 on: August 22, 2017, 04:21:34 PM »

Working on the visual designer portion of WinFBE now.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Richard Kelly

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 318
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #23 on: August 22, 2017, 07:58:07 PM »

I have small project in mind to test the designer out.

Rick
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8088
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #24 on: August 22, 2017, 08:01:02 PM »

...does it involve SQLite :)
« Last Edit: August 22, 2017, 08:56:39 PM by TechSupport »
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Richard Kelly

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 318
Re: WinFBE 1.4.4 on GitHub (August 18, 2017)
« Reply #25 on: August 23, 2017, 08:55:58 AM »

...does it involve SQLite :)

SQLite will be part of two efforts. One is to put a GUI on my calendaring class.

Rick
Logged
Pages: 1 [2]