Embroidermodder / Embroidermodder

Free machine embroidery software supporting a variety of formats.
https://www.libembroidery.org
Other
519 stars 142 forks source link

General GUI Enhancements #27

Open Metallicow opened 10 years ago

Metallicow commented 10 years ago

Making a thread for Users/Developers GUI Enhancements/Suggestions.

Round One. Ding! embroidersugg

  1. Not sure what rev/ver I am using since the changelog build didn't inject that into the end product. Also the Changelog Item is unimplemented currently.
  2. View Menu. Should have Fullscreen(F11), Minimize, Maximize, and AlwaysOnTop(Frame) Options.
  3. Help Icon in main toolbar is wasted screen real estate(duplicate) when help toolbar/project is open.
  4. All toolbars should have an individual size settings dropdown toolbar options(usually a small dropdown > btn on the end of each toolbar). If user wants all toolbars to globally the same size, then make an check bool option for this in the settings/toolbarDropdown menu popup thingy. The Global "Size Toolbar" could then be removed and free up more screen real-estate. For Example: I want all the cad toolbars 16 size, but like the main toolbars at 32/etc.
  5. Undo/Redo toolbars should have a dropdown also, with undo-redo History steps, (QtAssistant has an imp of this) so optionally the history panel wouldn't need to be shown, thus freeing screen real-estate space.
  6. Day/Night colors should have options in settings(Ex: 2 colors; fore and back colors). Also: FIXME Note in the pic with current night settings the foreground is unreadable as the fore and back colors are both black.
  7. The ByLayer ComboBox needs widened a bit more so the dropdown shows all the item's text. In the pic you cannot see what increment the user wants to select.
  8. ContextHelp. A menuItem for "What's This" should be in the Help Menu. Also a ContextHelp Button that could be in the Help ToolBar. And also an small ContextHelp Button injected in the far right of the main statusbar. A LifeSaver Bouy/with/without cursor is usually the icon for this. The fired function would send the application into ContextHelp Sensitive Mode, so the user can click on a widget they are interested in. The individual widgets themselves would all have individual help string attributes for the help popup(these should be short descriptions). Customizing the ContextHelp tooltip popup even more would be helpful if it had a small clickable hyperlink after the tooltip that would open a full page in the docs for more technical explanation.
  9. The Help Menu should have Online Submenu with links to the Website/Wikis/Support/Donations Place/etc.
  10. If possible with QT, a option for when moving(inbetween these evts: wx.EVT_MOVE_START, wx.EVT_MOVE_END) the frame to make it Transparent by a percent(Ex: 200 out of 1-255alpha). Ex: WinXP doesn't have this nice gui stuff that later versions of windows have.
  11. Color options for the Ruler also. Could be linked with the Day/Night/Theme fore/back colors
  12. Users want to focus on the designing most, so free up as much screen real-estate space with options as you can so that the design area has the majority of the focus/space at all times.
  13. Option for maybe a "minimal mode". Ex: one that would only have design window and console and/or onther absolutely necessary gui elements.
  14. Design Area Zooming: Ctrl++ ZoomsIn, Ctrl+- ZoomsOut, Ctrl+/ ZoomsDefault or Fit.
Metallicow commented 10 years ago

On Startup...

startupframe

  1. Provide Welcome message in Statusbar with version/ build Infos. Build Script should take care of all this version stuff.
  2. The Logo needs to scale with the frame size.
  3. The toolbars at this point are almost completely useless. Example: Remove/Hide the toolbars at this point and provide basic startup options as floating centered buttons(DC maybe) underneath the logo. i.e. New, Open, Help, Website, and maybe a few others like a Dropdown on the New Button that offers templates, Open Dropdown would offer recent files Help Dropdown would offer various places to get help/ etc.... 3-6 centered Buttons under the logo is nicer than a bunch of useless toolbars at this point of startup.
  4. Disable/Hide all the unecessary menus/menuitems in the needed menus at this point. Ex: You can't save anything, therefore disable it. Edit menu should be hidden as nothing is open. Etc...
  5. The actual built Windows exe needs the embroidermodder icon embedded into it. This would be an ico of varing sizes... 16, 24, 32, 48, 64, 72, 96, 128, 256px sizes.
  6. If your really bored after doing all this. Make some fun Easter eggs. Animate stitching the logo if clicked on/ Dragging on the background stitch logo offsets the seamless design/etc.
x2nie commented 10 years ago

Stitching the logo when workspace is empty, that's cool idea! lol :+1:

Metallicow commented 10 years ago

I could do this easily enough in python. I use wxPython mainly for GUI of choice, but could snuff up a basic proof of concept if I look into PySide or PyQt(umm, which one???). It could be easier ported into C++ that way. And faster with python as a prototype tool in this instance.

x2nie commented 10 years ago

I think I will play with PyQt too, since I installed QT in my PC. Here is a directory named 'experimental' within the root project. so you can create 'python' dir there and let's rock !?

redteam316 commented 10 years ago

R1 suggestions

  1. This is already in our project-files/TODO list.
  2. F11 is planned for other functionality. The F keys will likely be customizable in the future. Aside from Fullscreen capability, the other suggestions are out of project scope and the desktop environment you are using should handle those.
  3. I'm aware of this.
  4. All other priorities will always trump this. Unless a clean pull request is made by a third party, don't expect this to happen. The main reason toolbars are re-sizable is for accessibility.
  5. Not a bad idea. Which example shows this? I'm not seeing it or it may be in Qt5 only.
  6. Settings for day/night color is noted as a TODO already in the source code. As for the thread color matching the background color, this is not a bug and is intentional. You can embroider black thread on black material. Many people do this.
  7. Might be OS specific as I haven't had that problem. See if b159034bb4c14a78a42d3617ad1ef6b357a914f7 fixes it.
  8. We already have tooltips. This is a low-priority, best implemented as a native and then command.
  9. This is planned for other items and functionality. Eventually it will make its way into help menu but an online submenu makes sense.
  10. Out of scope. See point number 2.
  11. It already exists. It's in the settings.
  12. This will happen when toolbar customization etc... is fully implemented. It's already on the TODO list.
  13. See point 12. The GUI is already extremely lightweight. Almost all functionality is extended and implemented thru commands. Delete the contents of the commands folder and you will see how lean it really is.
  14. This must be done in a cross platform way and has been suggested by others. Falls mostly into the customization stuff planned later.

Startup

  1. Already, just not complete yet.
  2. No. There are minimum requirements for a reason. The initial window doesn't enforce this apparently so maybe that needs fixed. Scaling should be optional at best. The purpose of the backdrop is to showcase designs made with Embroidermodder. The logo/bg/styling itself is optional.
  3. Toolbar customization is not complete. Again on the TODO list already.
  4. Saving works and will not be disabled. Edit menu may need to be hidden initially, had other ideas for this.
  5. This is not a priority until final release. Pull requests welcome.
  6. Real features trump this. If we do, nobody will be informed of it anyway, that's the point. @x2nie take a look at the logo-quilt.png as an overlay on a flat colored background.
Metallicow commented 10 years ago

RE2 Startup: Whadya mean NO!??? dot period. You didn't provide a reason, just an excuse. Are you intent on users not being able to read the logo or are you bad with simple math or was the image I posted somehow corrupted by github? What I meant is the logo needs to be proportionally scalable. The background Texture should be pannable at the very least like a drag scroller with a optional setting for scaling within for example 25% to 400%. Or did I miss all that code in the repo that someone wrote already for this type of stuff.

Here let me help you out a bit...

If I cut the readability out I achieved this in 4 lines of code. 2 of which are if and else lines. The logo text only scales down if it is smaller than the frame size. The same calculation in C++ takes 4 lines. Maybe truth checking before posting isn't as important.

See attached GUI pics.

def OnPaint(self, event):
    """
    Handles the ``wx.EVT_PAINT`` event for :class:`EmbroidermodderPanel`.

    :param `event`: a `wx.PaintEvent` event to be processed.
    """
    event.Skip()
    cSizeX, cSizeY = self.GetClientSize()
    pdc = wx.BufferedPaintDC(self)
    pdc.Clear()
    pdc.DrawBitmap(self.displaySizeBackgroundBmp, 0, 0)
    if self.backgroundLogoW > cSizeX:
        # Proportional Scaling an Image.
        #
        # newWidth/oldWidth = newHeight/oldHeight
        #
        # Plug in the values that you know and solve
        # for the new dimension that you don't know.
        # Like this:
        #
        # newWidth/oldWidth = newHeight/oldHeight
        # oldHeight * newWidth/oldWidth = newHeight
        # newHeight = 300
        #
        # 400/800 = newHeight/600
        # 600 * 400/800 = newHeight
        # newHeight = 300

        newHeight = self.backgroundLogoH * cSizeX//self.backgroundLogoW
        scaledBmp = self.backgroundLogo.ConvertToImage().Scale(cSizeX, newHeight, wx.IMAGE_QUALITY_HIGH).ConvertToBitmap()
        pdc.DrawBitmap(scaledBmp, 0, cSizeY // 2 - scaledBmp.GetHeight() // 2)
    else:
        pdc.DrawBitmap(self.backgroundLogo, cSizeX // 2 - self.backgroundLogoW // 2, cSizeY // 2 - self.backgroundLogoH // 2)

scalelogo

wxPython like a guru. Oh, and looky! PySide/PyQt GUI too. Done in 3 hours with SourceCoder and Notepad++. Better refresh/renew up that algebra book again. :)~

pysidepyqtgui

Sorry no Tkinter GUI.

RE2 Sugg: Does QT have a KeyboardShortcuts Dialog? I know wxPy has one that I use for my projects. If Qt doesn't try looking at it. I believe it is a dict implementation as it iterates over all the menubar menus/items.

RE5 Sugg: Not sure. Qt isn't my cup of soup. I think I am still on day QT one 0 one. You will have to wait until at least QT day one 0 three, which might be a few... XD Just look at the Assistant code... XD. It is self documenting it looks like. What No! Nokia wrote that in JavaFX. XD

RE6 Sugg: It just isn't working for me. I know any color is cool as long as its black, but gee cant see a thing. Lets suggest renaming it Darkness or Pitch Black. If rendered in something such as blender, you at least have a certain percent of color variation, so that it is visible/readable. Not 1:1 Maybe make a simple color similarity warner widget, so when colors are close, it doesn't interfere with productivity.

RE7: I'll check it when I build next. Maybe in a few days.

RE11: Ok, I missed it. It's all the way at the bottom. It doesn't do foreground color tho...

RE5 Startup: I can manage to do this and optimize everything for the ico easily enough. I was looking more for a reply as to whether it was worked on already, so ok, got that cleared up.

RE9 Startup: Simple implementation in python GUIs

RE13 Sugg: Ok, so is there a plugins dialog.panel planned?

Metallicow commented 10 years ago

Regarding the Dropdown ToolButton. Here is the docs link. It even specifically references the Assistant. http://srinikom.github.io/pyside-docs/PySide/QtGui/QToolButton.html

Here is a PySide sample I whipped up. qtoolbutton_with_dropdown

#!/usr/bin/env python
# -*- coding: utf-8 -*-

try:
    from PySide import QtGui, QtCore
except ImportError:
    from PyQt4 import QtGui, QtCore

class Window(QtGui.QWidget):
    def __init__(self):
        QtGui.QWidget.__init__(self)
        layout = QtGui.QHBoxLayout(self)
        self.button = QtGui.QToolButton(self)
        self.button.setIcon(QtGui.QIcon('shapedbitmapbutton-hover.png'))
        self.button.setIconSize(QtCore.QSize(100, 100))
        self.button.setToolTip('I have a DropDown arrow!')
        self.button.setPopupMode(QtGui.QToolButton.MenuButtonPopup)
        self.button.setMenu(QtGui.QMenu(self.button))
        ## self.button.setArrowType(QtCore.Qt.ArrowType.DownArrow)
        self.listBox = QtGui.QListWidget(self)
        self.listBox.addItems(['Undo Item %d' % i for i in range(10)])
        action = QtGui.QWidgetAction(self.button)
        action.setDefaultWidget(self.listBox)
        self.button.menu().addAction(action)
        layout.addWidget(self.button)

if __name__ == '__main__':
    import sys
    app = QtGui.QApplication(sys.argv)
    window = Window()
    window.resize(200, 200)
    window.setWindowTitle('QToolButton_With_DropDown')
    window.show()
    sys.exit(app.exec_())
Metallicow commented 7 months ago

My suggestions in the python version GUI mockups should be taken with charm and respect to the dissenting individuals.

NOTE: Jon's original design I believe had to do with the main "panel" size being the minimum size (scale) for the actual working cnc table(embroidermachine). That is why he EXPLICITLY stated in GUI code that no artistic scaling down should occur. This would be correct in his design.

Although, if users was just designing(seperately from a Embroidermodder(TM) machine), then maybe my more "artistic approach" to scaling the MainFrame smaller than really necessary would even appeal to the actual user. Being a dynamic rendering user interface to what is already being stitched out in front of your eyes, plays another mega modding aspect that can be only a drool... Render the whole stitching out as if it was real-time(Delta), but try to avoid the game engine aspects, as this is a machine and meant for production sotherefore 'game-engines' need to play ABSOLUTLY NO PART in this repository here. That such fantasy absolutely needs to reside in it's own repository elsewhere within the organization. This is a MACHINE EMBROIDERY repository.

Thoughts on the Machine GUI and whatever are welcome... Please keep other game-ish things elsewhere. This is the Business-User end where people need to make results efficiently.