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

[New module] FancyContextMenu #9

Open
roundedrectangle opened this issue Dec 18, 2024 · 2 comments
Open

[New module] FancyContextMenu #9

roundedrectangle opened this issue Dec 18, 2024 · 2 comments

Comments

@roundedrectangle
Copy link

roundedrectangle commented Dec 18, 2024

In Quickddit, there are a few files related to extended ContextMenu functionality (FancyContextMenu, FancyMenuItemRow, FancyMenuItem, and FancyMenuImage). I thought it would be nice to organize this in an Opal module, so created one here.

Here is an example (with my modified version linked above):

Screenshot_20241218_160751_001

import QtQuick 2.0
import Sailfish.Silica 1.0
import '../modules/FancyContextMenu'

Page {
    SilicaListView {
        anchors.fill: parent
        model: 3

        delegate: ListItem {
            id: item
            Label {
                text: "Message"
                x: Theme.horizontalPageMargin
                y: Theme.paddingLarge
            }

            menu: Component {
                FancyContextMenu {
                    listItem: item
                    FancyMenuRow {
                        FancyMenuIcon {
                            icon.source: "image://theme/icon-m-clipboard"
                            onClicked: console.log("copying")
                        }
                        FancyMenuIcon {
                            icon.source: "image://theme/icon-m-delete"
                        }
                        FancyMenuIcon {
                            icon.source: "image://theme/icon-m-edit"
                        }
                    }

                    FancyMenuRow {
                        FancyIconMenuItem {
                            icon.source: "image://theme/icon-m-message-reply"
                            text: "Reply"
                            onClicked: console.log("replying")
                        }
                        FancyMenuItem {
                            text: "Forward"
                        }
                    }

                    MenuItem {
                        text: "About user"
                        onClicked: console.log("opening about user")
                    }

                    FancyAloneIconMenuItem {
                        icon.source: "image://theme/icon-m-favorite"
                        text: "Add to favourites"
                        onClicked: console.log("adding to favourites")
                    }
                }
            }
        }
    }
}

This is not yet fully complete, I still have to write documentation and add screenshots

@roundedrectangle
Copy link
Author

roundedrectangle commented Dec 18, 2024

I'm sorry, I think I need more time to work on this. Will re-open as soon as I finish it.

In general, it is done, but documentation and some advanced features aren't. I didn't see the template repository when opened this, but then saw it and realized that I forgot to write documentation.

@roundedrectangle roundedrectangle closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2024
@ichthyosaurus
Copy link
Member

Hey there, sorry I didn't comment earlier! I think it's a nice addition. If you don't mind, I'd like to reopen the issue just to document that it's still on the table. There's no hurry to work on it of course!

@ichthyosaurus ichthyosaurus reopened this Dec 28, 2024
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

2 participants