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

qml: Add DropShadow to the OptionSwitch indicatorButton #111

Closed
wants to merge 1 commit into from

Conversation

shaavan
Copy link
Contributor

@shaavan shaavan commented Jan 13, 2022

Some points to note:

@shaavan
Copy link
Contributor Author

shaavan commented Jan 13, 2022

Running the current version of the PR will cause the following error.

qrc:/qml/controls/OptionSwitch.qml:7:1: module "QtGraphicalEffects" is not installed

And to create dropShadow, we require this module. I tried to figure out some workaround, but I thought it's better to ask and go with the correct approach on the get-go.

@shaavan shaavan force-pushed the 220113-drop_shadow branch from e2d1635 to 2e8b096 Compare January 13, 2022 11:06
@shaavan
Copy link
Contributor Author

shaavan commented Jan 13, 2022

Updated from e2d1635 to 2e8b096.

Changes:

  • Made appropriate styling changes.

Diff:

diff --git a/src/qml/components/ConnectionSettings.qml b/src/qml/components/ConnectionSettings.qml
index 090e8e793..35f8e5d3a 100644
--- a/src/qml/components/ConnectionSettings.qml
+++ b/src/qml/components/ConnectionSettings.qml
@@ -15,21 +15,21 @@ ColumnLayout {
     }
     Setting {
         Layout.fillWidth: true
-        header:  qsTr("Daily upload limit")
+        header: qsTr("Daily upload limit")
     }
     Setting {
         Layout.fillWidth: true
-        header:  qsTr("Connection limit")
+        header: qsTr("Connection limit")
     }
     Setting {
         Layout.fillWidth: true
-        header:  qsTr("Listening enabled")
-        description:  qsTr("Reduces data usage.")
+        header: qsTr("Listening enabled")
+        description: qsTr("Reduces data usage.")
     }
     Setting {
         last: true
         Layout.fillWidth: true
-        header:  qsTr("Blocks Only")
-        description:  qsTr("Do not transfer unconfirmed transactions. Also disabled listening.")
+        header: qsTr("Blocks Only")
+        description: qsTr("Do not transfer unconfirmed transactions. Also disabled listening.")
     }
 }

@shaavan shaavan closed this Jan 13, 2022
@promag
Copy link
Contributor

promag commented Jan 13, 2022

Running the current version of the PR will cause the following error.

qrc:/qml/controls/OptionSwitch.qml:7:1: module "QtGraphicalEffects" is not installed

@shaavan try adding

Q_IMPORT_PLUGIN(QtGraphicalEffectsPlugin)
Q_IMPORT_PLUGIN(QtGraphicalEffectsPrivatePlugin)

#if defined(QT_STATICPLUGIN)
#include <QtPlugin>
Q_IMPORT_PLUGIN(QtQmlPlugin)
Q_IMPORT_PLUGIN(QtQmlModelsPlugin)
Q_IMPORT_PLUGIN(QtQuick2Plugin)
Q_IMPORT_PLUGIN(QtQuick2WindowPlugin)
Q_IMPORT_PLUGIN(QtQuickLayoutsPlugin);
Q_IMPORT_PLUGIN(QtQuickControls2Plugin);
Q_IMPORT_PLUGIN(QtQuickTemplates2Plugin);
#endif

@shaavan shaavan reopened this Jan 14, 2022
@shaavan shaavan marked this pull request as draft January 14, 2022 07:13
@shaavan shaavan force-pushed the 220113-drop_shadow branch from 2e8b096 to 109682b Compare January 17, 2022 06:47
@shaavan
Copy link
Contributor Author

shaavan commented Jan 17, 2022

Updated from 2e8b096 to 109682b (pr111.01 -> pr112.02)
Addressed @jarolrod, @promag suggestions.

Changes:

The PR is still in WIP. Currently, using the Q_IMPORT_PLUGIN caused the following error.

/usr/bin/ld: qt/libbitcoinqt.a(qt_libbitcoinqt_a-bitcoin.o): in function `_GLOBAL__sub_I__Z10QmlGuiMainiPPc':
bitcoin.cpp:(.text.startup+0xc2): undefined reference to `qt_static_plugin_QtGraphicalEffectsPlugin()'
/usr/bin/ld: bitcoin.cpp:(.text.startup+0xd2): undefined reference to `qt_static_plugin_QtGraphicalEffectsPrivatePlugin()'
collect2: error: ld returned 1 exit status

Copy link
Member

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

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

@shaavan as properly supporting this requires OpenGL support, let's leave the dropshadows for later.

@shaavan
Copy link
Contributor Author

shaavan commented Jan 23, 2022

supporting this requires OpenGL support, let's leave the dropshadows for later.

I understand. I shall close this PR for now. We can restart work on this once OpenGL support is appropriately integrated.

@shaavan
Copy link
Contributor Author

shaavan commented Jun 20, 2022

This PR is moved to #132.

Rationale:

  • For some reason. Force pushing the PR branch was not updating the PR. Hence decided to move the PR.

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