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

Implement autoscroll for research tree #2391

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

blabber
Copy link
Collaborator

@blabber blabber commented Sep 17, 2024

Allows the user to conveniently scroll the technology tree to the currently researched technology or the technology goal. A button next to the corresponding combo box is available to the user for this purpose.

In the absence of a suitable icon, the buttons currently have the mnemonic label “L” for “Locate”.

@blabber
Copy link
Collaborator Author

blabber commented Sep 17, 2024

The functionality is done, but I still want to use an icon for the QToolButtons. If someone who can handle Inkscape better and is a bit more talented than me would like to provide an icon, I would be grateful :)

@blabber blabber force-pushed the feature/autoscroll_techtree branch from 32c9126 to 67a946b Compare September 18, 2024 19:22
Allows the user to conveniently scroll the technology tree to the
currently researched technology or the technology goal. A button next
to the corresponding combo box is available to the user for this
purpose.

The icon used for the buttons is based on `crosshair-light` from
Phosphor Icons with minor modifications to let it play nicely with our
theming and to be recognizable on the small button.
@blabber blabber force-pushed the feature/autoscroll_techtree branch from 67a946b to c707c65 Compare September 18, 2024 19:24
@blabber
Copy link
Collaborator Author

blabber commented Sep 18, 2024

I added a slightly modified crosshair-light icon from Phosphor Icons. I guess this should be ready for review now.

@blabber blabber marked this pull request as ready for review September 18, 2024 19:27
@blabber
Copy link
Collaborator Author

blabber commented Sep 18, 2024

Closes #2365

@lmoureaux
Copy link
Contributor

It works, but the icons are a bit blurry:
image

This is because the icon is 256x256px and the line width is 12px. Scaled down to 16x16, this give a line width of 0.75px.

I came up with the following as a more pixel-perfect version on a 16x16 baseline:

<?xml version="1.0" encoding="UTF-8"?>
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
 <circle cx="8.5" cy="8.5" r="5.85" fill="none" stroke="#000" stroke-width="1.3"/>
 <g fill="#000">
  <circle cx="8.5" cy="8.5" r="2"/>
  <rect x="11.5" y="8" width="4.5" height="1"/>
  <rect x="1" y="8" width="4.5" height="1"/>
  <rect x="8" y="11.5" width="1" height="4.5"/>
  <rect x="8" y="1" width="1" height="4.5"/>
 </g>
</svg>

Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest looks good to me.

client/views/view_research.cpp Show resolved Hide resolved
@blabber
Copy link
Collaborator Author

blabber commented Sep 19, 2024

I updated the icon with the one @lmoureaux contributed; please check I got the license file right.

@blabber blabber force-pushed the feature/autoscroll_techtree branch from 69188ec to c05ce86 Compare September 19, 2024 19:36
@jwrober jwrober enabled auto-merge (rebase) September 19, 2024 19:39
@jwrober jwrober merged commit 9a92e3a into longturn:master Sep 19, 2024
20 checks passed
@blabber blabber deleted the feature/autoscroll_techtree branch September 19, 2024 19:55
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

Successfully merging this pull request may close these issues.

3 participants