Need an icon for "Help Layer" in the layer widget.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Need an icon for "Help Layer" in the layer widget.

dxli
The current way of using a "printer" icon to mean "Help Layer" causes lots of confusion. (for example, https://sourceforge.net/p/librecad/bugs/487/ )

Please help create a clear Help/Scatch layer icon.
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

stranger573
This post was updated on .
But this is entirely logical as there is now. The icons represent some properties of the layer. Such as visible/invisible, locked/not locked, printed/not printed.

I use this button to exclude some layers of printing. This useful options.
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

stranger573
Can use the guide lines for icons. The example in the file helplayer_example.png. I do not understand what image map is used. Did the size as 14x12.

helplayer_example.png
helplayer.png
helplayer_inactive.png
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

LordOfBikes
Administrator
The icons looks very good for me. Thanks for your contribution.

But, as I've written in https://sourceforge.net/p/librecad/bugs/489/, we should split this property. For compatibility reasons, the printer icon should stay to enable/disable printing, as this is a DXF documented property.
The construction layer property is a very useful feature without doubt. But we need an extra layer property for this. We have an icon candidate now, but the problem is how to save this property in the DXF, without breaking it for other CAD software. If we do it in an incompatible way, we only shift the infinite lines issues to can't open LibreCAD DXF issues.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

stranger573
With these icons, there is another problem. With some backgrounds (depends on theme) icons become invisible. See the icons.png file. Possible monochrome variant in the icons_variant.png file. This visible for all background. If it's good, then I upload the icons files.

icons.png
icons_variant.png
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

dxli
Yes, the variant version is better.

Please start from SVG files under the folder desktop/ in the LC source folder, and PNG files from SVG should be in the folder librecad/res/

stranger573 wrote
With these icons, there is another problem. With some backgrounds (depends on theme) icons become invisible. See the icons.png file. Possible monochrome variant in the icons_variant.png file. This visible for all background. If it's good, then I upload the icons files.

icons.png
icons_variant.png
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

stranger573
This post was updated on .
Hi,

OK. There are two variants. I upload it a little later. Need this to finish.

The size of the icons (14x12) correct? These icons are not to be scaled to other sizes. Need to make the correct size.

dxli wrote
Yes, the variant version is better.
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

dxli
we try to keep a copy of vector form of svg, and most icon picture files are by 150x150.

stranger573 wrote
Hi,

OK. There are two variants. I upload it a little later. Need this to finish.

The size of the icons (14x12) correct? These icons are not to be scaled to other sizes. Need to make the correct size.
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

stranger573
Hi,

Yes, I found this. But I was interested in the frame size for icons.
I read the source code in the file qg_layerwidget.cpp.
It contains:
    layerView->setColumnWidth(QG_LayerModel::VISIBLE, 16);
    layerView->setColumnWidth(QG_LayerModel::LOCKED, 16);
    layerView->setColumnWidth(QG_LayerModel::ConstructionLayer, 20);

From this I see that the sizes of the icons must be 16, 16, 20.

In this place the code there is an error for a set size. Here incorrectly calculates the size of the icons. The result after scaling we see that destroys the right edge of the icon.
I recompile LC with test icons. See attachments.

destroyed_right_border.png
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

dxli
we keep copies of vector icons for the future, when different icons sizes or even scalable icons are needed.

As shown in the source code you posted, only fixed sizes are used for the current LC 2.0.
stranger573 wrote
Hi,

Yes, I found this. But I was interested in the frame size for icons.
I read the source code in the file qg_layerwidget.cpp.
It contains:
    layerView->setColumnWidth(QG_LayerModel::VISIBLE, 16);
    layerView->setColumnWidth(QG_LayerModel::LOCKED, 16);
    layerView->setColumnWidth(QG_LayerModel::ConstructionLayer, 20);

From this I see that the sizes of the icons must be 16, 16, 20.

In this place the code there is an error for a set size. Here incorrectly calculates the size of the icons. The result after scaling we see that destroys the right edge of the icon.
I recompile LC with test icons. See attachments.

destroyed_right_border.png
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

stranger573
Yes. Understand now. Prepare the files.

dxli wrote
we keep copies of vector icons for the future, when different icons sizes or even scalable icons are needed.

As shown in the source code you posted, only fixed sizes are used for the current LC 2.0.
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

stranger573
Hi,

Three versions of the icons in the archive icons_variants.7z.
Variant_1 - monochrome icons with backlighting;
Variant_2 - simple monochrome icons;
Variant_3 - icons with LibreCAD color.
The SVG file is image optimized for the size 14x14px of output PNG images.

To use these icons requires a small code change. Unfortunately, I currently can't test the patches for the current LibreCAD master branch. Therefore, give examples of patches for LibreCAD-2.0.0 (example_patches.7z archive). Attention, my patches are for example only. This was tested for LibreCAD-2.0.0.

Example programs using these icons in the result_variant_3.png file.

icons_variants.7z
example_patches.7z
README.md
result_variant_3.png
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

dxli
Thanks!

I want to release 2.0.7 without applying this icon change, to avoid a big last minute patch set which is conspicuous to end users.

Following 2.0.7, we should have plenty of time to apply new icons for 2.0.8.

stranger573 wrote
Hi,

Three versions of the icons in the archive icons_variants.7z.
Variant_1 - monochrome icons with backlighting;
Variant_2 - simple monochrome icons;
Variant_3 - icons with LibreCAD color.
The SVG file is image optimized for the size 14x14px of output PNG images.

To use these icons requires a small code change. Unfortunately, I currently can't test the patches for the current LibreCAD master branch. Therefore, give examples of patches for LibreCAD-2.0.0 (example_patches.7z archive). Attention, my patches are for example only. This was tested for LibreCAD-2.0.0.

Example programs using these icons in the result_variant_3.png file.

icons_variants.7z
example_patches.7z
README.md
result_variant_3.png
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

stranger573
Hi,

OK.
I have found errors in the icons blockdefreeze and blockfreeze. Give the archive in which it is fixed.

icons_variants.7z
README.md

dxli wrote
I want to release 2.0.7 without applying this icon change, to avoid a big last minute patch set which is conspicuous to end users.
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

LordOfBikes
Administrator
Dongxu,

can you please have look at my forks HEAD.

I've restored the printing property for layers and added a new column for construction layer feature in layer list.
I store the construction layer property in a comment in the DXF layer table. I thought, this is the most compatible way. There is another way by extended data, DXF code 1001, for registered applications. But I'm afraid that this will lead into DXF compatibility issues with other software.

If you can agree with this solution, there are a few thing to do, but then I can merge to upstream.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

dxli
Hi Armin,

I will review your changes. Maybe, we can ask Rallaz to review DXF layer part.

Regards,

Dongxu
LordOfBikes wrote
Dongxu,

can you please have look at my forks HEAD.

I've restored the printing property for layers and added a new column for construction layer feature in layer list.
I store the construction layer property in a comment in the DXF layer table. I thought, this is the most compatible way. There is another way by extended data, DXF code 1001, for registered applications. But I'm afraid that this will lead into DXF compatibility issues with other software.

If you can agree with this solution, there are a few thing to do, but then I can merge to upstream.

Armin
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

LordOfBikes
Administrator
Yes, I will do that.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

stranger573
Hi,

In the final was one variant. These icons are visible with any background. The attachment contains the archive with files, examples of icons with different backgrounds and examples of real interfaces with dark and light themes. In interface I added printed layer column.

different_background_example.png
interface_dark_theme.png
interface_light_theme.png
icons_variant.7z
README.md
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

dxli
Thanks!

I got a little busy recently. Will try to review work from both Armin and you.

stranger573 wrote
Hi,

In the final was one variant. These icons are visible with any background. The attachment contains the archive with files, examples of icons with different backgrounds and examples of real interfaces with dark and light themes. In interface I added printed layer column.

different_background_example.png
interface_dark_theme.png
interface_light_theme.png
icons_variant.7z
README.md
Reply | Threaded
Open this post in threaded view
|

Re: Need an icon for "Help Layer" in the layer widget.

LordOfBikes
Administrator
In reply to this post by stranger573
stranger573,

with my refactoring of construction layer I've added your SVG from Jan. 1st and License file to LibreCAD repository. I used the icon for construction layer by now. I think it's better than the italic version from latest SVG. Also the italic version is prepared for very low resolution only.
The advantage of using SVG is, to have a base for lossless resizing. So we use vector graphics, that looks good at 150x150 with a line width that is thick enough to be visible when reduced to 16x16 icon size or less.

I've created a 150x150 pixel PNG for the icon. Scaling and smoothing to the needed size is done by the Qt Framework. Even the disabled state is done by Qt, there's no need to create a separate image for it. Thus we can use the one PNG image to load icons of different size if needed.

For the other icons I think, it's another task for refactoring, that should not be limited to layer list. Iirc there is a feature request or a thread in the forum about free selectable icon themes for the whole GUI. I think this it not work in progress now, but worth to keep in mind.


Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
12