PlaceholderText -> Placeholder

This commit is contained in:
Uwe Rathmann 2025-01-13 17:11:34 +01:00
parent 86b3c9f556
commit 1b4176625b
9 changed files with 18 additions and 18 deletions

View File

@ -1807,8 +1807,8 @@ template< typename Q > void Editor::setupTextControlMetrics()
setFontRole( Q::Text, Fluent2::Body );
setAlignment( Q::PlaceholderText, alignment( Q::Text ) );
setFontRole( Q::PlaceholderText, fontRole( Q::Text ) );
setAlignment( Q::Placeholder, alignment( Q::Text ) );
setFontRole( Q::Placeholder, fontRole( Q::Text ) );
}
template< typename Q, typename SK > void Editor::setupTextControlColors(
@ -1820,7 +1820,7 @@ template< typename Q, typename SK > void Editor::setupTextControlColors(
setColor( Q::TextPanel | SK::Selected, pal.fillColor.accent.selectedTextBackground );
setColor( Q::Text | SK::Selected, pal.fillColor.textOnAccent.selectedText );
setColor( Q::PlaceholderText, pal.fillColor.text.secondary );
setColor( Q::Placeholder, pal.fillColor.text.secondary );
for( const auto state : { A::NoState, Q::Hovered, Q::Focused, Q::Editing, Q::Disabled } )
{

View File

@ -404,7 +404,7 @@ void Editor::setupTextControl()
setColor( Q::Text | state, m_pal.color( colorGroup, P::Text ) );
setColor( Q::Text | SK::Selected | state, m_pal.color( colorGroup, P::HighlightedText ) );
setColor( Q::PlaceholderText, m_pal.color( colorGroup, P::PlaceholderText ) );
setColor( Q::Placeholder, m_pal.color( colorGroup, P::PlaceholderText ) );
}
setColor( Q::TextPanel | Q::ReadOnly, m_pal.disabled( P::Base ) );
@ -426,7 +426,7 @@ void Editor::setupTextArea()
using SK = QskTextAreaSkinlet;
setAlignment( Q::Text, Qt::AlignLeft | Qt::AlignTop );
setAlignment( Q::PlaceholderText, Qt::AlignLeft | Qt::AlignTop );
setAlignment( Q::Placeholder, Qt::AlignLeft | Qt::AlignTop );
setupTextControl< Q, SK >();
}
@ -437,7 +437,7 @@ void Editor::setupTextField()
using SK = QskTextFieldSkinlet;
setAlignment( Q::Text, Qt::AlignLeft | Qt::AlignVCenter );
setAlignment( Q::PlaceholderText, Qt::AlignLeft | Qt::AlignVCenter );
setAlignment( Q::Placeholder, Qt::AlignLeft | Qt::AlignVCenter );
setupTextControl< Q, SK >();
}

View File

@ -462,7 +462,7 @@ void Editor::setupTextControl()
setColor( Q::Text, m_pal.onSurface );
setFontRole( Q::Text, BodyLarge );
setAlignment( Q::PlaceholderText, Qt::AlignLeft | Qt::AlignVCenter );
setAlignment( Q::Placeholder, Qt::AlignLeft | Qt::AlignVCenter );
const auto disabledPanelColor = QskRgb::toTransparentF( m_pal.onSurface, 0.04 );
setGradient( Q::Panel | Q::Disabled, disabledPanelColor );
@ -472,9 +472,9 @@ void Editor::setupTextControl()
// PlaceholderText
setColor( Q::PlaceholderText, color( Q::Text ) );
setFontRole( Q::PlaceholderText, BodyLarge );
setAlignment( Q::PlaceholderText, alignment( Q::Text ) );
setColor( Q::Placeholder, color( Q::Text ) );
setFontRole( Q::Placeholder, BodyLarge );
setAlignment( Q::Placeholder, alignment( Q::Text ) );
}
void Editor::setupTextArea()

View File

@ -6,7 +6,7 @@
#include "QskTextArea.h"
QSK_SUBCONTROL( QskTextArea, Panel )
QSK_SUBCONTROL( QskTextArea, PlaceholderText )
QSK_SUBCONTROL( QskTextArea, Placeholder )
class QskTextArea::PrivateData
{

View File

@ -18,7 +18,7 @@ class QSK_EXPORT QskTextArea : public QskTextEdit
using Inherited = QskTextEdit;
public:
QSK_SUBCONTROLS( Panel, PlaceholderText )
QSK_SUBCONTROLS( Panel, Placeholder )
QskTextArea( QQuickItem* parent = nullptr );
QskTextArea( const QString& text, QQuickItem* parent = nullptr );

View File

@ -27,7 +27,7 @@ QRectF QskTextAreaSkinlet::subControlRect( const QskSkinnable* skinnable,
if ( subControl == Q::TextPanel )
return skinnable->subControlContentsRect( contentsRect, Q::Panel );
if ( subControl == Q::PlaceholderText )
if ( subControl == Q::Placeholder )
{
const auto textArea = static_cast< const QskTextArea* >( skinnable );
if( textArea->text().isEmpty() )
@ -57,7 +57,7 @@ QSGNode* QskTextAreaSkinlet::updateSubNode(
if ( text.isEmpty() )
return nullptr;
const auto subControl = Q::PlaceholderText;
const auto subControl = Q::Placeholder;
QskSkinHintStatus status;

View File

@ -6,7 +6,7 @@
#include "QskTextField.h"
QSK_SUBCONTROL( QskTextField, Panel )
QSK_SUBCONTROL( QskTextField, PlaceholderText )
QSK_SUBCONTROL( QskTextField, Placeholder )
class QskTextField::PrivateData
{

View File

@ -18,7 +18,7 @@ class QSK_EXPORT QskTextField : public QskTextInput
using Inherited = QskTextInput;
public:
QSK_SUBCONTROLS( Panel, PlaceholderText )
QSK_SUBCONTROLS( Panel, Placeholder )
QskTextField( QQuickItem* parent = nullptr );
QskTextField( const QString& text, QQuickItem* parent = nullptr );

View File

@ -27,7 +27,7 @@ QRectF QskTextFieldSkinlet::subControlRect( const QskSkinnable* skinnable,
if ( subControl == Q::TextPanel )
return skinnable->subControlContentsRect( contentsRect, Q::Panel );
if ( subControl == Q::PlaceholderText )
if ( subControl == Q::Placeholder )
{
const auto textField = static_cast< const QskTextField* >( skinnable );
if( textField->text().isEmpty() )
@ -57,7 +57,7 @@ QSGNode* QskTextFieldSkinlet::updateSubNode(
if ( text.isEmpty() )
return nullptr;
const auto subControl = Q::PlaceholderText;
const auto subControl = Q::Placeholder;
QskSkinHintStatus status;