refactor: Update ViewCube home button icon and position
This commit is contained in:
42
icons/home.svg
Normal file
42
icons/home.svg
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="currentColor"
|
||||||
|
class="size-6"
|
||||||
|
version="1.1"
|
||||||
|
id="svg2"
|
||||||
|
sodipodi:docname="home.svg"
|
||||||
|
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview2"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:zoom="14.574147"
|
||||||
|
inkscape:cx="6.9643869"
|
||||||
|
inkscape:cy="8.6797532"
|
||||||
|
inkscape:window-width="1440"
|
||||||
|
inkscape:window-height="831"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg2" />
|
||||||
|
<path
|
||||||
|
d="M11.47 3.841a.75.75 0 0 1 1.06 0l8.69 8.69a.75.75 0 1 0 1.06-1.061l-8.689-8.69a2.25 2.25 0 0 0-3.182 0l-8.69 8.69a.75.75 0 1 0 1.061 1.06l8.69-8.689Z"
|
||||||
|
id="path1"
|
||||||
|
style="fill:#ffffff" />
|
||||||
|
<path
|
||||||
|
d="m12 5.432 8.159 8.159c.03.03.06.058.091.086v6.198c0 1.035-.84 1.875-1.875 1.875H15a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 0-.75-.75h-3a.75.75 0 0 0-.75.75V21a.75.75 0 0 1-.75.75H5.625a1.875 1.875 0 0 1-1.875-1.875v-6.198a2.29 2.29 0 0 0 .091-.086L12 5.432Z"
|
||||||
|
id="path2"
|
||||||
|
style="fill:#ffffff" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -7,6 +7,7 @@
|
|||||||
<file>icons/circle.svg</file>
|
<file>icons/circle.svg</file>
|
||||||
<file>icons/save-sketch.svg</file>
|
<file>icons/save-sketch.svg</file>
|
||||||
<file>icons/cursor.svg</file>
|
<file>icons/cursor.svg</file>
|
||||||
|
<file>icons/home.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/shaders">
|
<qresource prefix="/shaders">
|
||||||
<file alias="simple.vert">src/shaders/simple.vert</file>
|
<file alias="simple.vert">src/shaders/simple.vert</file>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
ViewCube::ViewCube()
|
ViewCube::ViewCube()
|
||||||
{
|
{
|
||||||
m_homeButtonRenderer = new QSvgRenderer(QString(":/icons/rectangle.svg"));
|
m_homeButtonRenderer = new QSvgRenderer(QString(":/icons/home.svg"));
|
||||||
for (int i = 0; i < 6; ++i) {
|
for (int i = 0; i < 6; ++i) {
|
||||||
m_faceTextures[i] = nullptr;
|
m_faceTextures[i] = nullptr;
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ void ViewCube::paint2D(QPainter& painter, int widgetWidth, int widgetHeight)
|
|||||||
|
|
||||||
int viewCubeSize = 150; // logical pixels
|
int viewCubeSize = 150; // logical pixels
|
||||||
int buttonSize = 24;
|
int buttonSize = 24;
|
||||||
int buttonMargin = 8;
|
int buttonMargin = -32;
|
||||||
|
|
||||||
int viewCubeX = widgetWidth - viewCubeSize;
|
int viewCubeX = widgetWidth - viewCubeSize;
|
||||||
int viewCubeY = 0;
|
int viewCubeY = 0;
|
||||||
@@ -241,7 +241,7 @@ bool ViewCube::handleMousePress(const QPoint& pos, int widgetWidth, int widgetHe
|
|||||||
|
|
||||||
int viewCubeSize = 150;
|
int viewCubeSize = 150;
|
||||||
int buttonSize = 24;
|
int buttonSize = 24;
|
||||||
int buttonMargin = 8;
|
int buttonMargin = -32;
|
||||||
int viewCubeX = widgetWidth - viewCubeSize;
|
int viewCubeX = widgetWidth - viewCubeSize;
|
||||||
int viewCubeY = 0;
|
int viewCubeY = 0;
|
||||||
QRect homeButtonRect(viewCubeX - buttonMargin - buttonSize, viewCubeY, buttonSize, buttonSize);
|
QRect homeButtonRect(viewCubeX - buttonMargin - buttonSize, viewCubeY, buttonSize, buttonSize);
|
||||||
|
|||||||
Reference in New Issue
Block a user