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

fix: Fixed the display issue #175

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/common/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ QString Utils::formatMillisecond(qint64 millisecond, qint64 minValue)
curSecond = minValue;
}
if (curSecond < 3600) {
return QDateTime::fromSecsSinceEpoch(static_cast<qint64>(curSecond)).toUTC().toString("mm:ss");
return QDateTime::fromSecsSinceEpoch(static_cast<qint64>(curSecond)).toUTC().toString("hh:mm:ss");
}

return QString("60:00");
return QString("60:00:00");
}

/**
Expand Down
Binary file modified src/dsg/icons/recording_pause.dci
Binary file not shown.
Binary file modified src/dsg/icons/recording_start.dci
Binary file not shown.
Binary file modified src/dsg/icons/recording_stop.dci
Binary file not shown.
4 changes: 3 additions & 1 deletion src/gui/mainwindow/FolderListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,12 @@ Item {
folderListView.itemAtIndex(folderListView.currentIndex).isRename = true;
}
onEntered: {
tooltipVisible = true;
if (folderNameLabel.implicitWidth > folderNameLabel.width)
tooltipVisible = true;
if (folderListView.currentIndex == index) {
return;
}

parent.isHovered = true;
}
onExited: {
Expand Down
3 changes: 2 additions & 1 deletion src/gui/mainwindow/ItemListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ Item {
itemListView.itemAtIndex(index).isRename = true;
}
onEntered: {
rootItemDelegate.hovered = true;
if (noteNameLabel.implicitWidth > noteNameLabel.width)
rootItemDelegate.hovered = true;
}
onExited: {
rootItemDelegate.hovered = false;
Expand Down
55 changes: 43 additions & 12 deletions src/gui/mainwindow/RecordingView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import VNote 1.0
Item {
id: rootItem

property int iconSize: 24
property int btnSize: 30
property int iconSize: 72
property bool isRecording: true
property string time: "00:00"
property string time: "00:00:00"

signal pauseRecording
signal stopRecording
Expand All @@ -18,38 +19,65 @@ Item {
curves.stopRecording();
stopRecording();
rootItem.visible = false;
time = "00:00";
time = "00:00:00";
}

implicitHeight: 42
implicitWidth: 364
implicitHeight: 70
visible: false

onVisibleChanged: {
curves.startRecording();
}

Rectangle {
id: backRectangle

anchors.fill: parent

gradient: Gradient {
GradientStop {
color: DTK.themeType === ApplicationHelper.LightType ? "#19FFFFFF" : "#19242424"
position: 0.0
}

GradientStop {
color: DTK.themeType === ApplicationHelper.LightType ? "white" : "#242424"
position: 0.3
}
}
}

Rectangle {
id: back

anchors.bottom: backRectangle.bottom
anchors.bottomMargin: 10
anchors.horizontalCenter: parent.horizontalCenter
border.color: DTK.themeType === ApplicationHelper.LightType ? "#0A000000" : "#19FFFFFF"
border.width: 1
color: DTK.themeType === ApplicationHelper.LightType ? "#7FF4F4F4" : "#0A0A10"
implicitHeight: 42
implicitWidth: 364
radius: 12
}

RowLayout {
anchors.fill: parent
spacing: 0
anchors.centerIn: back
implicitHeight: 42
implicitWidth: 364
spacing: 10

ToolButton {
id: pauseBtn

height: rootItem.height
icon.height: iconSize
icon.name: isRecording ? "recording_pause" : "recording_start"
icon.width: iconSize
spacing: 0
width: rootItem.height
implicitHeight: btnSize
implicitWidth: btnSize

background: Item {
}

onClicked: {
pauseRecording();
Expand All @@ -74,11 +102,14 @@ Item {
ToolButton {
id: stopBtn

height: rootItem.height
icon.height: iconSize
icon.name: "recording_stop"
icon.width: iconSize
width: rootItem.height
implicitHeight: btnSize
implicitWidth: btnSize

background: Item {
}

onClicked: {
stop();
Expand Down
10 changes: 5 additions & 5 deletions src/gui/mainwindow/WebEngineView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ Item {
color: webView.backgroundColor
visible: noSearchResult

IconLabel {
DciIcon {
id: noSearchIcon

anchors.centerIn: noSearchRect
icon.name: "search_no_results"
name: "search_no_results"
theme: DTK.themeType
visible: noSearchResult
}
}
Expand Down Expand Up @@ -344,11 +345,10 @@ Item {

active: false
anchors.bottom: rootItem.bottom
anchors.bottomMargin: 10
anchors.horizontalCenter: rootItem.horizontalCenter
asynchronous: true
height: 42
width: 364
height: 70
width: rootItem.width

sourceComponent: RecordingView {
id: recordingBar
Expand Down
30 changes: 28 additions & 2 deletions src/web/css/bootstrapCssReset.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ p {
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.20);
top: 135%;
top: 115%;
left: -12px;
}

Expand All @@ -138,6 +138,26 @@ p {
outline: none;
}

.note-color-back .note-color-palette .note-color-btn {
position: relative;
}

.note-color-back .note-color-palette .note-color-btn::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 110%;
height: 1px;
background-color: transparent;
transform: translate(-50%, -50%) rotate(135deg);
pointer-events: none; /* 确保斜线不会影响按钮的点击事件 */
}

.note-color-back .note-color-palette .note-color-row:first-child .note-color-btn:first-child::before {
background-color: #00000040;
}

.colorFont {
color: rgba(65, 77, 104, 1);
margin: 3px;
Expand Down Expand Up @@ -241,6 +261,7 @@ ul {

.note-editable {
padding: 20px 20px 0 30px;
padding-bottom: 50px;
}

.note-editable img {
Expand Down Expand Up @@ -299,6 +320,11 @@ ul {
color: inherit;
}

.note-air-popover {
max-width: 100% !important;
margin: 0 auto !important;
}

.dropdown-fontsize>li>a:hover,
.dropdown-fontname>li>a:hover {
background-color: rgba(0, 0, 0, 0.05);
Expand Down Expand Up @@ -399,4 +425,4 @@ ul {
border-bottom-left-radius: 6px;
}

/***** 字体名称/大小按钮 End *****/
/***** 字体名称/大小按钮 End *****/
4 changes: 4 additions & 0 deletions src/web/css/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ strike[style="text-decoration-line: underline;"] {
border-color: rgba(255, 255, 255, 0.2);
}

.note-color-back .note-color-palette .note-color-row:first-child .note-color-btn:first-child::before {
background-color: rgba(255, 255, 255, 0.2);;
}

.planButton button {
background: rgba(255, 255, 255, 0.10);
}
Expand Down
8 changes: 4 additions & 4 deletions src/web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ var isUlOrOl = false
const airPopoverHeight = 44 //悬浮工具栏高度
const airPopoverWidth = 385 //悬浮工具栏宽度
const airPopoverLeftMargin = 20 //悬浮工具栏距离编辑区左侧边距
const airPopoverRightMargin = 15 //悬浮工具栏距离编辑区右侧边距
const airPopoverRightMargin = 35 //悬浮工具栏距离编辑区右侧边距

// 翻译列表
var tooltipContent = {
Expand Down Expand Up @@ -1656,7 +1656,7 @@ $('body').on('click', '.dropdown-toggle', function (e) {
if (menuItem && menuItem.classList.contains('dropdown-menu')) {
if (needClose) {
// reset css config
menuItem.style.top = '135%';
menuItem.style.top = '115%';
return;
}
// temporarily set display to block to get the height of the menu
Expand All @@ -1677,9 +1677,9 @@ $('body').on('click', '.dropdown-toggle', function (e) {
menuItem.classList.remove('show');

if (showTop) {
menuItem.style.top = '-' + (menuRect.height + 20) + 'px';
menuItem.style.top = '-' + (menuRect.height + 10) + 'px';
} else {
menuItem.style.top = '135%';
menuItem.style.top = '115%';
}
}
})
4 changes: 2 additions & 2 deletions src/web/js/summernote_v9_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -7262,8 +7262,8 @@
// 更新当前选中色
var selectColor = $('.note-forecolor .selectColor').css('background-color')
$('.icon-forecolor .path1').css('color', selectColor)
var curBackColors = isDarkTheme ? this.options.simpleDarkBackColors

var curBackColors = isDarkTheme ? this.options.simpleDarkBackColors
: this.options.simpleLightBackColors;
if (0 == curBackColors.length) {
console.warn("Not found background color palette!");
Expand Down
Loading