-rw-r--r-- | libopie/colorpopupmenu.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libopie/colorpopupmenu.cpp b/libopie/colorpopupmenu.cpp index dac10e9..5a8d77e 100644 --- a/libopie/colorpopupmenu.cpp +++ b/libopie/colorpopupmenu.cpp | |||
@@ -116,51 +116,54 @@ OColorPopupMenu::OColorPopupMenu( const QColor& color, QWidget* parent, const ch | |||
116 | 116 | ||
117 | addColor(QColor(128, 0, 0), 2, 0); | 117 | addColor(QColor(128, 0, 0), 2, 0); |
118 | addColor(QColor(128, 64, 0), 2, 1); | 118 | addColor(QColor(128, 64, 0), 2, 1); |
119 | addColor(QColor(128, 128, 0), 2, 2); | 119 | addColor(QColor(128, 128, 0), 2, 2); |
120 | addColor(QColor(64, 128, 0), 2, 3); | 120 | addColor(QColor(64, 128, 0), 2, 3); |
121 | addColor(QColor(0, 128, 0), 2, 4); | 121 | addColor(QColor(0, 128, 0), 2, 4); |
122 | addColor(QColor(0, 128, 64), 2, 5); | 122 | addColor(QColor(0, 128, 64), 2, 5); |
123 | 123 | ||
124 | addColor(QColor(0, 255, 255), 3, 0); | 124 | addColor(QColor(0, 255, 255), 3, 0); |
125 | addColor(QColor(0, 128, 255), 3, 1); | 125 | addColor(QColor(0, 128, 255), 3, 1); |
126 | addColor(QColor(0, 0, 255), 3, 2); | 126 | addColor(QColor(0, 0, 255), 3, 2); |
127 | addColor(QColor(128, 0, 255), 3, 3); | 127 | addColor(QColor(128, 0, 255), 3, 3); |
128 | addColor(QColor(255, 0, 255), 3, 4); | 128 | addColor(QColor(255, 0, 255), 3, 4); |
129 | addColor(QColor(255, 0, 128), 3, 5); | 129 | addColor(QColor(255, 0, 128), 3, 5); |
130 | 130 | ||
131 | addColor(QColor(0, 128, 128), 4, 0); | 131 | addColor(QColor(0, 128, 128), 4, 0); |
132 | addColor(QColor(0, 64, 128), 4, 1); | 132 | addColor(QColor(0, 64, 128), 4, 1); |
133 | addColor(QColor(0, 0, 128), 4, 2); | 133 | addColor(QColor(0, 0, 128), 4, 2); |
134 | addColor(QColor(64, 0, 128), 4, 3); | 134 | addColor(QColor(64, 0, 128), 4, 3); |
135 | addColor(QColor(128, 0, 128), 4, 4); | 135 | addColor(QColor(128, 0, 128), 4, 4); |
136 | addColor(QColor(128, 0, 64), 4, 5); | 136 | addColor(QColor(128, 0, 64), 4, 5); |
137 | 137 | ||
138 | insertItem( colorPanel ); | 138 | insertItem( colorPanel ); |
139 | insertSeparator(); | 139 | insertSeparator(); |
140 | insertItem(tr("More"),this,SLOT( moreColorClicked())); | ||
141 | /* | ||
140 | QAction* chooseColorAction = new QAction( tr( "More" ), tr( "More..." ), 0, colorPanel, "More" ); | 142 | QAction* chooseColorAction = new QAction( tr( "More" ), tr( "More..." ), 0, colorPanel, "More" ); |
141 | connect( chooseColorAction, SIGNAL( activated() ), this, SLOT( moreColorClicked() ) ); | 143 | connect( chooseColorAction, SIGNAL( activated() ), this, SLOT( moreColorClicked() ) ); |
142 | chooseColorAction->addTo( this ); | 144 | chooseColorAction->addTo( this ); |
145 | */ | ||
143 | activateItemAt( 0 ); | 146 | activateItemAt( 0 ); |
144 | } | 147 | } |
145 | 148 | ||
146 | OColorPopupMenu::~OColorPopupMenu() | 149 | OColorPopupMenu::~OColorPopupMenu() |
147 | { | 150 | { |
148 | } | 151 | } |
149 | 152 | ||
150 | void OColorPopupMenu::addColor( const QColor& color, int row, int col ) | 153 | void OColorPopupMenu::addColor( const QColor& color, int row, int col ) |
151 | { | 154 | { |
152 | OColorPanelButton* panelButton = new OColorPanelButton( color, colorPanel ); | 155 | OColorPanelButton* panelButton = new OColorPanelButton( color, colorPanel ); |
153 | connect( panelButton, SIGNAL( selected( const QColor& ) ), this, SLOT( buttonSelected( const QColor& ) ) ); | 156 | connect( panelButton, SIGNAL( selected( const QColor& ) ), this, SLOT( buttonSelected( const QColor& ) ) ); |
154 | colorLayout->addWidget( panelButton, row, col ); | 157 | colorLayout->addWidget( panelButton, row, col ); |
155 | } | 158 | } |
156 | 159 | ||
157 | void OColorPopupMenu::buttonSelected( const QColor& color ) | 160 | void OColorPopupMenu::buttonSelected( const QColor& color ) |
158 | { | 161 | { |
159 | m_color = color; | 162 | m_color = color; |
160 | emit colorSelected( color ); | 163 | emit colorSelected( color ); |
161 | hide(); | 164 | hide(); |
162 | } | 165 | } |
163 | 166 | ||
164 | void OColorPopupMenu::moreColorClicked() | 167 | void OColorPopupMenu::moreColorClicked() |
165 | { | 168 | { |
166 | QColor color = OColorDialog::getColor( m_color ); | 169 | QColor color = OColorDialog::getColor( m_color ); |