Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse scroll changes wrong freq digit. #49

Open
imoldovavan opened this issue Feb 4, 2020 · 11 comments
Open

Mouse scroll changes wrong freq digit. #49

imoldovavan opened this issue Feb 4, 2020 · 11 comments

Comments

@imoldovavan
Copy link

The mouse wheel changes the wrong digit when I try to change frequency by scrolling.
Using the lates comit. The interface looks good.
Manjaro Linux.
4.19.97-1-MANJARO

@m5evt
Copy link
Contributor

m5evt commented Apr 9, 2020

I believe this is now fixed in this pull request #50

@sq8mvy
Copy link
Contributor

sq8mvy commented Apr 16, 2020

pull request #50 still not fixed mouse scroll changes.

@m5evt
Copy link
Contributor

m5evt commented Apr 18, 2020

Could you provide some more information please? My understanding of this was that placing the mouse over the frequency in the VFO display at the top of the screen, the mouse wheel did not scroll correctly through the frequencies. If this is the issue you observe still after a fresh clone, can you provide some information about OS, which radio you are using etc?

@sq8mvy
Copy link
Contributor

sq8mvy commented Apr 18, 2020

Please, look at my movie -> https://drive.google.com/open?id=1-Mhk6IEJN0hW_JrO16hOsaOMRPJOm1kr
Coordinate calculations are not adapted to the new font width.
Before changing the VFO font, scrolling worked correctly.
Linux Mint 19.3 and Kubuntu
i'm using google translator, my english is poor.

@g0orx
Copy link
Owner

g0orx commented Apr 18, 2020

This problem is caused by the change to use the Overpass font face for the VFO frequency. It requires the Overpass font to be installed. If it is not then installed it uses another font face but the mapping for the scroll wheel do not match.
-- John g0orx

@m5evt
Copy link
Contributor

m5evt commented Apr 18, 2020

Thanks both. I originally changed this on a machine with overpass installed. I have since changed dev machine. This machine doesn't have overpass installed. I have just tried:

cairo_select_font_face(cr, "blah_blah_blah", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);

it compiled and ran fine. I suspect cairo silently goes to some system default if it can't find the font. Confirmed here (in the description of the "toy" text API):

https://www.cairographics.org/manual/cairo-text.html

I've just tested a few different Linux VMs and none had overpass as default. This is not good and I will remove overpass. I will look for a suitable font in various flavours of Ubuntu and one that works on Mac. Then I will update scroll wheel mapping.

@sq8mvy
Copy link
Contributor

sq8mvy commented Apr 18, 2020

I installed the Overpass font from https://overpassfont.org
The Overpass font is not a fixed width font. The "Overpass mono" font has a fixed width.
The Overpass font is not installed by default in LinuxMint and Kubuntu.
Linhpsdr picture with the "Overpass mono" font
Linhpsdr_font_Overpass_mono

@m5evt
Copy link
Contributor

m5evt commented Apr 18, 2020

Thanks, I will fix this.

@m5evt
Copy link
Contributor

m5evt commented Apr 25, 2020

I have selected Noto Mono. This seems to be the least bad looking monospace font that is more commonly available on ubuntu flavours. I've tested this on Ubuntu 19.10, kubuntu 18.04 and lubuntu 18.04. I have yet to test on a mac, but it seems to be possible for mac too. If it is not available on a mac, the cairo default mono font might work anyway.

Please could you test the latest commit in this fork:

https://github.com/m5evt/linhpsdr

@sq8mvy
Copy link
Contributor

sq8mvy commented Apr 25, 2020

The font looks good. Changing the VFO with the mouse is now correct.
No empty space for invisible preceding numbers, which doesn't look good.
VFO shifts to the right after exceeding tens, hundreds or thousands of MHZ
It is worth returning to the VFO presentation that was before the font change.
Linhpsdr_VFO_font

I found a problem by accident. Changing the VFO at the visible position of the mouse cursor leads to this effect:
VFO_error_mouse_scroll

@m5evt
Copy link
Contributor

m5evt commented Apr 25, 2020

Until someone requests a change, the scroll is now locked to an upper limit of 99.999999 GHz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants