Skip to content

Commit

Permalink
Added color theme adjustment, expand settings
Browse files Browse the repository at this point in the history
  • Loading branch information
instance-id committed Mar 18, 2020
1 parent 915c5f6 commit c6c35cb
Show file tree
Hide file tree
Showing 38 changed files with 2,765 additions and 1,400 deletions.
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
searcher.db
python2.7libs/*
!python2.7libs/searcher/
python2.7libs/searcher/searcher/db
python2.7libs/searcher/searcher/.history
python2.7libs/searcher/.history
**.history*
python2.7libs/searcher/searcher/go/houdini
python2.7libs/searcher/searcher/_conversion
python2.7libs/searcher/go/houdini
python2.7libs/searcher/db*
python2.7libs/searcher/_conversion
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down Expand Up @@ -155,3 +156,4 @@ dmypy.json

# Pyre type checker
.pyre/
python2.7libs/searcher/db/searcher.db
34 changes: 33 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,37 @@
"gocommandtext",
"updatetmphk",
"updatetmphotkey"
]
],
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.pyc": true,
"**/*.meta": true,
"**/*.*.meta": true,
"**/*.unity": true,
"**/*.unityproj": true,
"**/*.mat": true,
"**/*.fbx": true,
"**/*.FBX": true,
"**/*.tga": true,
"**/*.cubemap": true,
"**/*.prefab": true,
"**/Library": true,
"**/ProjectSettings": true,
"**/Temp": true,
"**/.history": true,
"**/.vscode": true,
"**/.idea": true,
"**/venv": true,
"python2.7libs/peewee-3.13.1.dist-info": true,
"python2.7libs/*.dist-info": true,
"python2.7libs/playhouse": true,
"python2.7libs/qtpy": true,
"python2.7libs/Qt.py": true,
"python2.7libs/peewee.py": true
},
"explorerExclude.backup": null
}
24 changes: 11 additions & 13 deletions python2.7libs/searcher/HelpButton.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# region Imports
from __future__ import print_function
from __future__ import absolute_import
import weakref
Expand All @@ -14,25 +13,24 @@
from hutil.Qt import QtCore
from hutil.Qt import QtWidgets

# ----------------------------------------------------------------- Help
# NOTE -----------------------------------------------------------------


class HelpButton(QtWidgets.QPushButton):
# ---------------------------------------------------- Help
# NOTE Help -----------------------------------------------
class HelpButton(QtWidgets.QToolButton):
"""Generic Help button."""

def __init__(self, name, tooltip, size, parent=None):
super(HelpButton, self).__init__(
hou.qt.createIcon("BUTTONS_help"), "", parent=parent
)
super(HelpButton, self).__init__(parent=parent)

self._name = name
self.setToolTip(tooltip)
self.setIconSize(QtCore.QSize(size, size))
self.setMaximumSize(QtCore.QSize(size, size))
self.setFlat(True)

self.clicked.connect(self.display_help)
help_button_size = hou.ui.scaledSize(16)
self.setProperty("flat", True)
self.setIcon(hou.qt.createIcon("BUTTONS_help"))
self.setIconSize(QtCore.QSize(
help_button_size,
help_button_size
))

def display_help(self):
"""Display help panel."""
Expand Down
11 changes: 5 additions & 6 deletions python2.7libs/searcher/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#PYPANEL CODE
# from searcher import searcher
# reload(searcher)
#
# def createInterface():
# return searcher.Searcher()
__package__ = "searcher"
__version__ = "0.1b"
__author__ = "instance.id"
__copyright__ = "2020 All rights reserved. See LICENSE for more details."
__status__ = "Prototype"
76 changes: 32 additions & 44 deletions python2.7libs/searcher/about_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,58 +17,46 @@ def setupUi(self, About):
About.setMinimumSize(QtCore.QSize(100, 0))
About.setBaseSize(QtCore.QSize(0, 0))
About.setStyleSheet("")

self.gridLayout = QtWidgets.QGridLayout(About)
self.gridLayout.setContentsMargins(-1, -1, -1, 6)
self.gridLayout.setSpacing(0)
self.gridLayout.setSpacing(6)
self.gridLayout.setObjectName("gridLayout")
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")

# ------------------------------------------------------ logo
# NOTE logo -------------------------------------------------
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.secondrow = QtWidgets.QHBoxLayout()
self.secondrow.setObjectName("secondrow")
self.web = QtWidgets.QLabel(About)
self.web.setObjectName("web")
self.secondrow.addWidget(self.web)
self.verticalLayout.addLayout(self.secondrow)
self.headerrow = QtWidgets.QHBoxLayout()
self.headerrow.setObjectName("headerrow")
self.github = QtWidgets.QLabel(About)
self.github.setObjectName("github")
self.headerrow.addWidget(self.github)
self.verticalLayout.addLayout(self.headerrow)
self.horizontalLayout.addLayout(self.verticalLayout)
self.verticalLayout_4.addLayout(self.horizontalLayout)
self.gridLayout.addLayout(self.verticalLayout_4, 0, 0, 1, 1)
self.logo = QtWidgets.QLabel(About)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.logo.sizePolicy().hasHeightForWidth())
self.logo.setSizePolicy(sizePolicy)
self.logo.setMaximumSize(QtCore.QSize(170, 170))
self.logo.setMaximumSize(QtCore.QSize(120, 120))
self.logo.setText("")
self.logo.setPixmap(QtGui.QPixmap(scriptpath + "/images/logo.png"))
self.logo.setScaledContents(True)
self.logo.setObjectName("logo")
self.verticalLayout_4.addWidget(self.logo)

# ------------------------------------------------- headerrow
# NOTE headerrow --------------------------------------------
self.headerrow = QtWidgets.QHBoxLayout()
self.headerrow.setObjectName("headerrow")

self.github = LinkLabel(About, '<a href="http://github.com/instance-id/">github/instance-id</a>')
self.github.setObjectName("github")
self.headerrow.addWidget(self.github)
self.verticalLayout_4.addLayout(self.headerrow)

# ------------------------------------------------- secondrow
# NOTE Second Row -------------------------------------------
self.secondrow = QtWidgets.QHBoxLayout()
self.secondrow.setObjectName("secondrow")

self.web = LinkLabel(About, "instance.id")
self.web.setObjectName("web")
self.secondrow.addWidget(self.web)
self.verticalLayout_4.addLayout(self.secondrow)

# -------------------------------------------------- thirdrow
# NOTE Third Row --------------------------------------------
self.thirdrow = QtWidgets.QHBoxLayout()
self.thirdrow.setObjectName("fifthrow")
spacerItem2 = QtWidgets.QSpacerItem(40, 2, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.thirdrow.addItem(spacerItem2)
spacerItem3 = QtWidgets.QSpacerItem(40, 2, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.thirdrow.addItem(spacerItem3)
self.verticalLayout_4.addLayout(self.thirdrow)
self.gridLayout.addLayout(self.verticalLayout_4, 0, 0, 1, 1)
self.gridLayout.addWidget(self.logo, 0, 1, 1, 1)

self.retranslateUi(About)
QtCore.QMetaObject.connectSlotsByName(About)
Expand All @@ -79,11 +67,11 @@ def retranslateUi(self, About):
self.github.setText(_translate("About", '<a href="http://github.com/instance-id/"><font color=#E6E6E6>github/instance-id</font></a>'))
self.web.setText(_translate("About", '<a href="https://instance.id/"><font color=#E6E6E6>instance.id</font></a>'))

class LinkLabel(QtWidgets.QLabel):
def __init__(self, parent, text):
super(LinkLabel, self).__init__(parent)
# class LinkLabel(QtWidgets.QLabel):
# def __init__(self, parent, text):
# super(LinkLabel, self).__init__(parent)

self.setText(text)
self.setTextFormat(QtCore.Qt.RichText)
self.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
self.setOpenExternalLinks(True)
# self.setText(text)
# self.setTextFormat(QtCore.Qt.RichText)
# self.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
# self.setOpenExternalLinks(True)
94 changes: 47 additions & 47 deletions python2.7libs/searcher/bugreport_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,62 @@ def setupUi(self, BugReport):
BugReport.setStyleSheet("")
self.gridLayout = QtWidgets.QGridLayout(BugReport)
self.gridLayout.setContentsMargins(-1, -1, -1, 6)
self.gridLayout.setSpacing(0)
self.gridLayout.setSpacing(6)
self.gridLayout.setObjectName("gridLayout")
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")

# ------------------------------------------------------ logo
# NOTE logo -------------------------------------------------
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.secondrow = QtWidgets.QHBoxLayout()
self.secondrow.setObjectName("secondrow")
self.lineEdit = QtWidgets.QLineEdit(BugReport)
self.lineEdit.setMinimumSize(QtCore.QSize(175, 0))
self.lineEdit.setObjectName("lineEdit")
self.secondrow.addWidget(self.lineEdit)
self.verticalLayout.addLayout(self.secondrow)
self.headerrow = QtWidgets.QHBoxLayout()
self.headerrow.setObjectName("headerrow")
self.lineEdit_2 = QtWidgets.QLineEdit(BugReport)
self.lineEdit_2.setMinimumSize(QtCore.QSize(175, 0))
self.lineEdit_2.setObjectName("lineEdit_2")
self.headerrow.addWidget(self.lineEdit_2)
self.verticalLayout.addLayout(self.headerrow)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.textEdit = QtWidgets.QTextEdit(BugReport)
self.textEdit.setObjectName("textEdit")
self.horizontalLayout_2.addWidget(self.textEdit)
spacerItem = QtWidgets.QSpacerItem(0, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.horizontalLayout_2.addItem(spacerItem)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.horizontalLayout.addLayout(self.verticalLayout)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.logo = QtWidgets.QLabel(BugReport)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.logo.sizePolicy().hasHeightForWidth())
self.logo.setSizePolicy(sizePolicy)
self.logo.setMaximumSize(QtCore.QSize(170, 170))
self.logo.setMaximumSize(QtCore.QSize(120, 120))
self.logo.setText("")
self.logo.setPixmap(QtGui.QPixmap(scriptpath + "/images/logo.png"))
self.logo.setScaledContents(True)
self.logo.setObjectName("logo")
self.verticalLayout_4.addWidget(self.logo)

# ------------------------------------------------- headerrow
# NOTE headerrow --------------------------------------------
self.headerrow = QtWidgets.QHBoxLayout()
self.headerrow.setObjectName("headerrow")

self.github = LinkLabel(BugReport, '<a href="http://github.com/instance-id/">github/instance-id</a>')
self.github.setObjectName("github")
self.headerrow.addWidget(self.github)
self.verticalLayout_4.addLayout(self.headerrow)

# ------------------------------------------------- secondrow
# NOTE Second Row -------------------------------------------
self.secondrow = QtWidgets.QHBoxLayout()
self.secondrow.setObjectName("secondrow")

self.web = LinkLabel(BugReport, "instance.id")
self.web.setObjectName("web")
self.secondrow.addWidget(self.web)
self.verticalLayout_4.addLayout(self.secondrow)

# -------------------------------------------------- thirdrow
# NOTE Third Row --------------------------------------------
self.thirdrow = QtWidgets.QHBoxLayout()
self.thirdrow.setObjectName("fifthrow")
spacerItem2 = QtWidgets.QSpacerItem(40, 2, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.thirdrow.addItem(spacerItem2)
spacerItem3 = QtWidgets.QSpacerItem(40, 2, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.thirdrow.addItem(spacerItem3)
self.verticalLayout_4.addLayout(self.thirdrow)
self.horizontalLayout_3.addWidget(self.logo)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.pushButton = QtWidgets.QPushButton(BugReport)
self.pushButton.setObjectName("pushButton")
self.horizontalLayout_4.addWidget(self.pushButton)
self.verticalLayout_2.addLayout(self.horizontalLayout_4)
self.horizontalLayout.addLayout(self.verticalLayout_2)
self.verticalLayout_4.addLayout(self.horizontalLayout)
self.gridLayout.addLayout(self.verticalLayout_4, 0, 0, 1, 1)

self.retranslateUi(BugReport)
Expand All @@ -76,14 +83,7 @@ def setupUi(self, BugReport):
def retranslateUi(self, BugReport):
_translate = QtCore.QCoreApplication.translate
BugReport.setWindowTitle(_translate("BugReport", "Form"))
self.github.setText(_translate("BugReport", '<a href="http://github.com/instance-id/"><font color=#E6E6E6>github/instance-id</font></a>'))
self.web.setText(_translate("BugReport", '<a href="https://instance.id/"><font color=#E6E6E6>instance.id</font></a>'))

class LinkLabel(QtWidgets.QLabel):
def __init__(self, parent, text):
super(LinkLabel, self).__init__(parent)

self.setText(text)
self.setTextFormat(QtCore.Qt.RichText)
self.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
self.setOpenExternalLinks(True)
self.lineEdit.setPlaceholderText(_translate("BugReport", "Name:"))
self.lineEdit_2.setPlaceholderText(_translate("BugReport", "Contact:"))
self.textEdit.setPlaceholderText(_translate("BugReport", "What was the issue?"))
self.pushButton.setText(_translate("BugReport", "Submit Bug"))
Loading

0 comments on commit c6c35cb

Please sign in to comment.