Skip to content

Commit

Permalink
Version 0.5.0 Beta (2021-09-04)
Browse files Browse the repository at this point in the history
  • Loading branch information
tretdm authored Sep 4, 2021
1 parent 633aeed commit 65551ce
Show file tree
Hide file tree
Showing 17 changed files with 2,227 additions and 741 deletions.
93 changes: 92 additions & 1 deletion chat_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,103 @@ def setupUi(self, Form):
font.setFamily("Consolas")
font.setPointSize(10)
self.chat_text.setFont(font)
self.chat_text.setStyleSheet("selection-background-color: rgb(161, 75, 0);")
self.chat_text.setStyleSheet("selection-background-color: rgb(161, 75, 0);\n"
"\n"
"QScrollBar::handle {\n"
"border-syle: outset;\n"
"background: #444444;\n"
"border-width: 2px;\n"
"border-radius: 10px;\n"
"}\n"
"\n"
"QScrollBar::handle::pressed {\n"
"background: rgb(161, 75, 0);\n"
"}\n"
"\n"
"QScrollBar::add-page {\n"
"background-color: rgb(43, 43, 43);\n"
"}")
self.chat_text.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
self.chat_text.setUndoRedoEnabled(False)
self.chat_text.setReadOnly(True)
self.chat_text.setObjectName("chat_text")
self.horizontalLayout_4.addWidget(self.chat_text)
self.verticalScrollBar = QtWidgets.QScrollBar(Form)
self.verticalScrollBar.setStyleSheet("QScrollBar:vertical {\n"
" border: 0px solid;\n"
" background: rgb(43, 43, 43);\n"
" width: 15px;\n"
" margin: 16px 0 16px 0;\n"
" }\n"
" QScrollBar::handle:vertical {\n"
" background: rgb(161, 75, 0);\n"
" border-width: 2px;\n"
" border-radius: 10px;\n"
" }\n"
" QScrollBar::add-line:vertical {\n"
" border: 0px solid;\n"
" background-color: rgb(43, 43, 43);\n"
" height: 16px;\n"
" subcontrol-position: bottom;\n"
" subcontrol-origin: margin;\n"
" image: url(:/arrows/up_arrow_dark.png);\n"
" }\n"
"\n"
" QScrollBar::sub-line:vertical {\n"
" border: 0px solid;\n"
" background: rgb(43, 43, 43);\n"
" height: 16px;\n"
" subcontrol-position: top;\n"
" subcontrol-origin: margin;\n"
" image: url(:/arrows/down_arrow_dark.png);\n"
" }\n"
"\n"
" QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n"
" background: none;\n"
" }")
self.verticalScrollBar.setOrientation(QtCore.Qt.Vertical)
self.verticalScrollBar.setObjectName("verticalScrollBar")
self.horizontalLayout_4.addWidget(self.verticalScrollBar)
self.verticalScrollBar_2 = QtWidgets.QScrollBar(Form)
self.verticalScrollBar_2.setStyleSheet("QScrollBar:vertical {\n"
" border: 0px solid;\n"
" background: rgb(43, 43, 43);\n"
" width: 15px;\n"
" margin: 16px 0 16px 0;\n"
" }\n"
" QScrollBar::handle:vertical {\n"
" background: rgb(161, 75, 0);\n"
" border-width: 2px;\n"
" border-radius: 10px;\n"
" }\n"
" QScrollBar::add-line:vertical {\n"
" border: 0px solid;\n"
" background-color: rgb(43, 43, 43);\n"
" height: 16px;\n"
" subcontrol-position: bottom;\n"
" subcontrol-origin: margin;\n"
" image: url(:/arrows/up_arrow_dark.png);\n"
" }\n"
"\n"
" QScrollBar::sub-line:vertical {\n"
" border: 0px solid;\n"
" background: rgb(43, 43, 43);\n"
" height: 16px;\n"
" subcontrol-position: top;\n"
" subcontrol-origin: margin;\n"
" image: url(:/arrows/down_arrow_dark.png);\n"
" }\n"
"\n"
" QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n"
" background: none;\n"
" }")
self.verticalScrollBar_2.setOrientation(QtCore.Qt.Vertical)
self.verticalScrollBar_2.setObjectName("verticalScrollBar_2")
self.horizontalLayout_4.addWidget(self.verticalScrollBar_2)
self.members_list = QtWidgets.QTreeWidget(Form)
self.members_list.setMinimumSize(QtCore.QSize(144, 0))
self.members_list.setMaximumSize(QtCore.QSize(144, 16777215))
self.members_list.setStyleSheet("selection-background-color: rgb(161, 75, 0);")
self.members_list.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.members_list.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
self.members_list.setEditTriggers(QtWidgets.QAbstractItemView.DoubleClicked|QtWidgets.QAbstractItemView.SelectedClicked)
Expand All @@ -44,6 +133,7 @@ def setupUi(self, Form):
self.members_list.setExpandsOnDoubleClick(True)
self.members_list.setObjectName("members_list")
self.members_list.header().setVisible(False)
self.members_list.header().setStretchLastSection(True)
self.horizontalLayout_4.addWidget(self.members_list)
self.verticalLayout.addLayout(self.horizontalLayout_4)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
Expand Down Expand Up @@ -76,3 +166,4 @@ def retranslateUi(self, Form):
self.members_list.headerItem().setText(0, _translate("Form", "Members"))
self.message_text.setText(_translate("Form", "На данный момент отправить сообщение нельзя"))
self.send_msg_btn.setText(_translate("Form", "Отправить"))
import resources_rc
112 changes: 110 additions & 2 deletions chat_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,25 @@ color: rgb(255, 255, 255);</string>
</font>
</property>
<property name="styleSheet">
<string notr="true">selection-background-color: rgb(161, 75, 0);</string>
<string notr="true">selection-background-color: rgb(161, 75, 0);

QScrollBar::handle {
border-syle: outset;
background: #444444;
border-width: 2px;
border-radius: 10px;
}

QScrollBar::handle::pressed {
background: rgb(161, 75, 0);
}

QScrollBar::add-page {
background-color: rgb(43, 43, 43);
}</string>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="undoRedoEnabled">
<bool>false</bool>
Expand All @@ -39,6 +57,88 @@ color: rgb(255, 255, 255);</string>
</property>
</widget>
</item>
<item>
<widget class="QScrollBar" name="verticalScrollBar">
<property name="styleSheet">
<string notr="true">QScrollBar:vertical {
border: 0px solid;
background: rgb(43, 43, 43);
width: 15px;
margin: 16px 0 16px 0;
}
QScrollBar::handle:vertical {
background: rgb(161, 75, 0);
border-width: 2px;
border-radius: 10px;
}
QScrollBar::add-line:vertical {
border: 0px solid;
background-color: rgb(43, 43, 43);
height: 16px;
subcontrol-position: bottom;
subcontrol-origin: margin;
image: url(:/arrows/up_arrow_dark.png);
}

QScrollBar::sub-line:vertical {
border: 0px solid;
background: rgb(43, 43, 43);
height: 16px;
subcontrol-position: top;
subcontrol-origin: margin;
image: url(:/arrows/down_arrow_dark.png);
}

QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}</string>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QScrollBar" name="verticalScrollBar_2">
<property name="styleSheet">
<string notr="true">QScrollBar:vertical {
border: 0px solid;
background: rgb(43, 43, 43);
width: 15px;
margin: 16px 0 16px 0;
}
QScrollBar::handle:vertical {
background: rgb(161, 75, 0);
border-width: 2px;
border-radius: 10px;
}
QScrollBar::add-line:vertical {
border: 0px solid;
background-color: rgb(43, 43, 43);
height: 16px;
subcontrol-position: bottom;
subcontrol-origin: margin;
image: url(:/arrows/up_arrow_dark.png);
}

QScrollBar::sub-line:vertical {
border: 0px solid;
background: rgb(43, 43, 43);
height: 16px;
subcontrol-position: top;
subcontrol-origin: margin;
image: url(:/arrows/down_arrow_dark.png);
}

QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}</string>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QTreeWidget" name="members_list">
<property name="minimumSize">
Expand All @@ -53,6 +153,9 @@ color: rgb(255, 255, 255);</string>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">selection-background-color: rgb(161, 75, 0);</string>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
Expand Down Expand Up @@ -80,6 +183,9 @@ color: rgb(255, 255, 255);</string>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<attribute name="headerStretchLastSection">
<bool>true</bool>
</attribute>
<column>
<property name="text">
<string>Members</string>
Expand Down Expand Up @@ -141,6 +247,8 @@ color: rgb(79, 79, 79);</string>
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
</ui>
Binary file added down_arrow_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added down_arrow_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 65551ce

Please sign in to comment.